File tree Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,11 @@ description: |
66url : https://github.com/alignoth/alignoth
77input :
88 - bam : Path to indexed BAM file
9+ - bam_idx : Path to BAM index file
910 - reference : Path to indexed reference FASTA file
11+ - reference_idx : Path to index of reference FASTA file
1012 - vcf : Path to indexed VCF file (Optional)
11- - idx : Path to index of VCF file (required when VCF is used)
13+ - vcf_idx : Path to index of VCF file (required when VCF is used)
1214 - bed : Path to BED file (Optional)
1315output : " HTML, JSON or directory path"
1416authors :
Original file line number Diff line number Diff line change 11rule alignoth_json :
22 input :
33 bam = "NA12878.bam" ,
4+ bam_idx = "NA12878.bam.bai" ,
45 reference = "ref.fa" ,
6+ reference_idx = "ref.fa.fai" ,
57 vcf = "1257A.vcf.gz" ,
6- idx = "1257A.vcf.gz.csi"
8+ vcf_idx = "1257A.vcf.gz.csi"
79 output :
810 "out/json_plot.vl.json"
911 params :
@@ -16,9 +18,11 @@ rule alignoth_json:
1618rule alignoth_html :
1719 input :
1820 bam = "NA12878.bam" ,
21+ bam_idx = "NA12878.bam.bai" ,
1922 reference = "ref.fa" ,
23+ reference_idx = "ref.fa.fai" ,
2024 vcf = "1257A.vcf.gz" ,
21- idx = "1257A.vcf.gz.csi"
25+ vcf_idx = "1257A.vcf.gz.csi"
2226 output :
2327 "out/plot.html"
2428 params :
@@ -31,9 +35,11 @@ rule alignoth_html:
3135rule alignoth_output_dir :
3236 input :
3337 bam = "NA12878.bam" ,
38+ bam_idx = "NA12878.bam.bai" ,
3439 reference = "ref.fa" ,
40+ reference_idx = "ref.fa.fai" ,
3541 vcf = "1257A.vcf.gz" ,
36- idx = "1257A.vcf.gz.csi"
42+ vcf_idx = "1257A.vcf.gz.csi"
3743 output :
3844 directory ("output-dir/" )
3945 params :
Original file line number Diff line number Diff line change 1313
1414# BAM input
1515if snakemake .input .get ("bam" , "" ):
16- cmd .append (f"-b { snakemake .input .bam } " )
16+ if snakemake .input .get ("bam_idx" , "" ):
17+ cmd .append (f"-b { snakemake .input .bam } " )
18+ else :
19+ raise ValueError ("BAM input given without bai index" )
1720else :
1821 raise ValueError ("BAM input required" )
1922
2023# Reference
2124if snakemake .input .get ("reference" , "" ):
22- cmd .append (f"-r { snakemake .input .reference } " )
25+ if snakemake .input .get ("reference_idx" , "" ):
26+ cmd .append (f"-r { snakemake .input .reference } " )
27+ else :
28+ raise ValueError ("Reference input given without fai index" )
2329else :
2430 raise ValueError ("Reference input required" )
2531
2632# Optional VCF with required csi/tbi index
2733if snakemake .input .get ("vcf" , "" ):
28- if snakemake .input .get ("idx " , "" ):
34+ if snakemake .input .get ("vcf_idx " , "" ):
2935 cmd .append (f"-v { snakemake .input .vcf } " )
3036 else :
3137 raise ValueError ("VCF input given without csi/tbi index" )
You can’t perform that action at this time.
0 commit comments