Biowulf High Performance Computing at the NIH
hrdetect: detection and analysis of homologous recombination deficiency signatures

Hrdetect is a tool for detection and analysis of homologous recombination deficiency signatures. It was developed to accurately detect BRCA1/BRCA2-deficient samples.

References:

Documentation
Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program. Sample session:

[user@biowulf]$ sinteractive --gres=lscratch:10 --mem=8g 

[user@cn3329 ~]$ module load hrdetect   
[+] Loading gcc  7.2.0  ...
[+] Loading hrdetect 20190829  ...
[user@cn3329 ~]$ git clone https://github.com/eyzhao/hrdetect-pipeline 
[user@cn3329 ~]$ cd hrdetect-pipeline 
[user@cn3329 ~]$ cp $HRDETECT_EXAMPLE/Snakefile .  
[user@cn3329 ~]$ snakemake -p 
Provided cores: 1
Rules claiming more threads will be scaled down.
Job counts:
        count   jobs
        1       aggregate_hrdetect_components
        1       all
        3       combine_scores
        1       hrdetect_component_paths
        1       hrdetect_output_table
        3       snv_signatures_signit_summary
        3       sv_signatures_signit_summary
        13

rule snv_signatures_signit_summary:
    input: output/example/patients/patient3/sample1/snv_signatures/signit_output.Rds
    output: output/example/patients/patient3/sample1/snv_signatures/signit_exposure_summary.tsv, output/example/patients/patient3/sample1/snv_signatures/signit_exposure_summary_fractions.tsv
    jobid: 12
    wildcards: project=example, patient=patient3, sample=sample1

Rscript scripts/signatures/signit_summary_table.R -i output/example/patients/patient3/sample1/snv_signatures/signit_output.Rds -o output/example/patients/patient3/sample1/snv_signatures/signit_exposure_summary.tsv --signit /usr/local/Anaconda/envs_app/hrdetect/20190829/SignIT-1.0.1 && Rscript scripts/signatures/signit_summary_table.R -i output/example/patients/patient3/sample1/snv_signatures/signit_output.Rds -o output/example/patients/patient3/sample1/snv_signatures/signit_exposure_summary_fractions.tsv --fraction --signit /usr/local/Anaconda/envs_app/hrdetect/20190829/SignIT-1.0.1
Loading required package: usethis
 Attaching packages  tidyverse 1.2.1 
 ggplot2 3.0.0      purrr   0.3.2
 tibble  2.1.3      dplyr   0.8.3
 tidyr   0.8.1      stringr 1.4.0
 readr   1.1.1      forcats 0.3.0
 Conflicts  tidyverse_conflicts() 
 dplyr::filter() masks stats::filter()
 dplyr::lag()    masks stats::lag()
Loading required package: coda
Linked to JAGS 4.3.0
Loaded modules: basemod,bugs
Loading signit
Loading required package: Rcpp
...
Reading SignIT data
Created summary table.
[1] "Results saved as TSV at output/example/patients/patient3/sample1/snv_signatures/signit_exposure_summary.tsv"
...
Finished job 12.
1 of 13 steps (8%) done

rule snv_signatures_signit_summary:
    input: output/example/patients/patient2/sample1/snv_signatures/signit_output.Rds
    output: output/example/patients/patient2/sample1/snv_signatures/signit_exposure_summary.tsv, output/example/patients/patient2/sample1/snv_signatures/signit_exposure_summary_fractions.tsv
    jobid: 9
    wildcards: project=example, patient=patient2, sample=sample1

Rscript scripts/signatures/signit_summary_table.R -i output/example/patients/patient2/sample1/snv_signatures/signit_output.Rds -o output/example/patients/patient2/sample1/snv_signatures/signit_exposure_summary.tsv --signit /usr/local/Anaconda/envs_app/hrdetect/20190829/SignIT-1.0.1 && Rscript scripts/signatures/signit_summary_table.R -i output/example/patients/patient2/sample1/snv_signatures/signit_output.Rds -o output/example/patients/patient2/sample1/snv_signatures/signit_exposure_summary_fractions.tsv --fraction --signit /usr/local/Anaconda/envs_app/hrdetect/20190829/SignIT-1.0.1
...
Reading SignIT data
Created summary table.
[1] "Results saved as TSV at output/example/patients/patient2/sample1/snv_signatures/signit_exposure_summary.tsv"
Finished job 9.
2 of 13 steps (15%) done

rule snv_signatures_signit_summary:
    input: output/example/patients/patient1/sample1/snv_signatures/signit_output.Rds
    output: output/example/patients/patient1/sample1/snv_signatures/signit_exposure_summary.tsv, output/example/patients/patient1/sample1/snv_signatures/signit_exposure_summary_fractions.tsv
    jobid: 15
    wildcards: project=example, patient=patient1, sample=sample1
Rscript scripts/signatures/signit_summary_table.R -i output/example/patients/patient1/sample1/snv_signatures/signit_output.Rds -o output/example/patients/patient1/sample1/snv_signatures/signit_exposure_summary.tsv --signit /usr/local/Anaconda/envs_app/hrdetect/20190829/SignIT-1.0.1 && Rscript scripts/signatures/signit_summary_table.R -i output/example/patients/patient1/sample1/snv_signatures/signit_output.Rds -o output/example/patients/patient1/sample1/snv_signatures/signit_exposure_summary_fractions.tsv --fraction --signit /usr/local/Anaconda/envs_app/hrdetect/20190829/SignIT-1.0.1
...
Reading SignIT data
Created summary table.
[1] "Results saved as TSV at output/example/patients/patient1/sample1/snv_signatures/signit_exposure_summary.tsv"
...
Finished job 15.
3 of 13 steps (23%) done

rule sv_signatures_signit_summary:
    input: output/example/patients/patient2/sample1/sv_signatures/sv_signit_output.Rds
    output: output/example/patients/patient2/sample1/sv_signatures/sv_signit_exposure_summary.tsv
, output/example/patients/patient2/sample1/sv_signatures/sv_signit_exposure_summary_fractions.tsv
    jobid: 7
    wildcards: project=example, patient=patient2, sample=sample1

Rscript scripts/signatures/signit_summary_table.R -i output/example/patients/patient2/sample1/sv_
signatures/sv_signit_output.Rds -o output/example/patients/patient2/sample1/sv_signatures/sv_sign
it_exposure_summary.tsv --signit /usr/local/Anaconda/envs_app/hrdetect/20190829/SignIT-1.0.1 && R
script scripts/signatures/signit_summary_table.R -i output/example/patients/patient2/sample1/sv_s
ignatures/sv_signit_output.Rds -o output/example/patients/patient2/sample1/sv_signatures/sv_signi
t_exposure_summary_fractions.tsv --fraction --signit /usr/local/Anaconda/envs_app/hrdetect/201908
29/SignIT-1.0.1
...
Reading SignIT data
Created summary table.
[1] "Results saved as TSV at output/example/patients/patient2/sample1/sv_signatures/sv_signit_exp
osure_summary.tsv"
...
Created summary table.
[1] "Results saved as TSV at output/example/patients/patient2/sample1/sv_signatures/sv_signit_exposure_summary_fractions.tsv"
Finished job 7.
4 of 13 steps (31%) done
...
Created summary table.
[1] "Results saved as TSV at output/example/patients/patient1/sample1/sv_signatures/sv_signit_exposure_summary_fractions.tsv"
Finished job 16.
5 of 13 steps (38%) done
...
Created summary table.
[1] "Results saved as TSV at output/example/patients/patient3/sample1/sv_signatures/sv_signit_exposure_summary_fractions.tsv"
Finished job 13.
6 of 13 steps (46%) done
...
Finished job 5.
7 of 13 steps (54%) done
...
Finished job 4.
8 of 13 steps (62%) done
...
Finished job 6.
9 of 13 steps (69%) done
...
Finished job 3.
10 of 13 steps (77%) done
...
Done merging
Output written to output/example/cohorts/all/hrdetect/hrdetect_input_table.tsv
Finished job 2.
11 of 13 steps (85%) done
...
Finished job 1.
12 of 13 steps (92%) done
...
Finished job 0.
13 of 13 steps (100%) done
example all
Running glob: examples/example/patient*/sample*/snv.vcf
Glob complete.
Running glob: examples/example/patient*/sample*/sv.tsv
Glob complete.
Running glob: examples/example/patient*/sample*/indel.vcf
Glob complete.
Running glob: examples/example/patient*/sample*/cnv.txt
Glob complete.
    patient  samples
0  patient1  sample1
1  patient3  sample1
2  patient2  sample1
0    blahpatient1sample1
1    blahpatient3sample1
2    blahpatient2sample1
dtype: object
0    output/example/patients/patient1/sample1/hrdet...
1    output/example/patients/patient3/sample1/hrdet...
2    output/example/patients/patient2/sample1/hrdet...
dtype: object

End the interactive session:
[user@cn3329 ~]$ exit
salloc.exe: Relinquishing job allocation 46116226