Skip to content
Snippets Groups Projects
Commit f2dfbb2b authored by Helene Rimbert's avatar Helene Rimbert
Browse files

reorder query annotation related rules from main Snakefile to rules/preprocessGenomes.smk

parent 3afaef54
No related branches found
No related tags found
No related merge requests found
......@@ -15,35 +15,19 @@ rule all:
config['finalPrefix']+'_LC.proteins.fasta',
config['finalPrefix']+'_gmap_differentChrom.gff3',
config['finalPrefix']+'_anchoringSummary.csv',
config['finalPrefix']+'_blatSummary.csv'
config['finalPrefix']+'_blatSummary.csv',
'report/dag.png',
'report/rulegraph.png'
rule grepGffFeature:
message: " Collect selected features from GFF file"
input: config['annotationQuery']
params: config['featureType']
output: temp(config['results']+"/1.features.bed")
log: config['results']+"/1.grepGffFeature.log"
shell:
"""
bin/gff2bed.sh {params} {input} 1> {output} 2> {log}
"""
rule splitGffPerChrom:
message: "Split Gff Features per chromosome: current is {wildcards.chrom}"
input: config['results']+"/1.features.bed"
output: temp(config['results']+"/1.features/{chrom}.bed")
log: config['results']+"/1.features/{chrom}.fgrep.log"
params: "chr{chrom}"
shell:
"""
fgrep {params} {input} 1> {output} 2> {log}
"""
rule createDiagrams:
message: "Create dag and rulegraph of the pipeline"
output: dag='report/dag.png', rulegraphe='report/rulegraph.png'
shell:
"""
snakemake --dag |dot -T png > report/dag.png
snakemake --rulegraph |dot -T png > report/rulegraph.png
snakemake --dag |dot -T png > {output.dag}
snakemake --rulegraph |dot -T png > {output.rulegraph}
"""
include: "rules/preprocessISBP.smk"
include: "rules/preprocessGenomes.smk"
include: "rules/bedtoolsClosest.smk"
......
rule grepGffFeature:
message: " Collect selected features from GFF file"
input: config['annotationQuery']
params: config['featureType']
output: temp(config['results']+"/1.features.bed")
log: config['results']+"/1.grepGffFeature.log"
shell:
"""
bin/gff2bed.sh {params} {input} 1> {output} 2> {log}
"""
rule splitGffPerChrom:
message: "Split Gff Features per chromosome: current is {wildcards.chrom}"
input: config['results']+"/1.features.bed"
output: temp(config['results']+"/1.features/{chrom}.bed")
log: config['results']+"/1.features/{chrom}.fgrep.log"
params: "chr{chrom}"
shell:
"""
fgrep {params} {input} 1> {output} 2> {log}
"""
rule indexQuery:
message: " Indexing Query fasta file using samtools faidx"
input: config['queryFasta']
......@@ -16,4 +38,4 @@ rule gmapIndexTarget:
output: directory(config['results']+"/target_gmapindex")
params: indexname="target_gmapindex", indexPath=config['results']
log: config['results']+"/target_gmapindex.log"
shell: "gmap_build -D {params.indexPath} -d {params.indexname} {input} &> {log}"
\ No newline at end of file
shell: "gmap_build -D {params.indexPath} -d {params.indexname} {input} &> {log}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment