Skip to content

Repository containing the code and methods for Bosch & DeJesus et al. 2021

Notifications You must be signed in to change notification settings

rock-lab/vulnerability_2021

Repository files navigation

Vulnerability 2021

Repository containing the code and methods for Bosch & DeJesus et al. 2021

Below is a short legend describing the main files, followed by example running the code:

vulnerability_modeling_tools.R

R code with functions useful for running the vulnerability analysis.

vulnerability_plotting_tools.R

R code with functions useful for plotting vulnerability results

gene_vul_analysis_parallel.R

R code for running vulnerability analysis in paralell.

single_guide_cov_betalogistic.stan

Stan code for the vulnerability model.

gene_vul_plots_parallel.R

R code for creating plots of vulnerability results in parallel.

process_reads.py

Python code to process fastq files with reads

subread.py

Tools useful to interact with the subread aligner. Must install via your OS package manager (e.g. sudo apt install subread)

counting_tools.py

Tools useful for counting the aligned reads

Example

Analysis

To run the actual analysis with example parameters simply run:

Rscript gene_vul_analysis_parellel.R

Alternatively, users can provide three parameters:

  • desired_strain (label to describe strain being analyzed, helpful to distinguish results)
  • label (general label to distinguish results)
  • data_path (path to the CSV formatted file with passaging data)

Rscript gene_vul_analysis_parellel.R H37Rv test example_H37Rv_data.txt

Plotting

Similarly, users can create plots of the results by running the following command:

Rscript gene_vul_plots_parallel.R

Alternatively users can provide four parameters:

  • desired_strain (label to describe strain being analyzed, helpful to distinguish results)
  • label (general label to distinguish results)
  • data_path (path to the CSV formatted file with passaging data)
  • results path (path to the directory containing the resuls from the analysis.)

Rscript gene_vul_plots_parallel.R H37Rv test example_H37Rv_data.txt data/H37Rv/test/

Releases

No releases published

Packages

No packages published