Skip to content
Snippets Groups Projects
Snakefile 1.49 KiB
configfile: "config.yaml"

rule all: 
	input:
		config['finalPrefix']+'_HC.gff3',
		config['finalPrefix']+'_LC.gff3',
		config['finalPrefix']+'_missing.txt',
		config['finalPrefix']+'_HC.transcripts.fasta',
		config['finalPrefix']+'_HC.cds.fasta',
		config['finalPrefix']+'_HC.cds.valid.explained.txt',
		config['finalPrefix']+'_HC.proteins.fasta',
		config['finalPrefix']+'_LC.transcripts.fasta',
		config['finalPrefix']+'_LC.cds.fasta',
		config['finalPrefix']+'_LC.cds.valid.explained.txt',
		config['finalPrefix']+'_LC.proteins.fasta',
		config['finalPrefix']+'_gmap_differentChrom.gff3',
		config['finalPrefix']+'_anchoringSummary.csv',
		config['finalPrefix']+'_blatSummary.csv'

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}
		"""

include: "rules/preprocessISBP.smk"
include: "rules/preprocessGenomes.smk"
include: "rules/bedtoolsClosest.smk"
include: "rules/geneAnchoring.smk"
include: "rules/checkCds.smk"