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

add input pointing to the mapping/chrom/temp directory containing all the...

add input pointing to the mapping/chrom/temp directory containing all the mapping files (blat, gmap)
parent a6b15d58
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,8 @@ rule mapHomologousRegions:
markersOnTarget=config['results']+"/1.filteredISBPs/{chrom}/sorted.bed"
output:
allblat=config['results']+'/3.mapping/{chrom}/allBlat.csv',
summary=config['results']+'/3.mapping/{chrom}/mappingSummary.csv'
summary=config['results']+'/3.mapping/{chrom}/mappingSummary.csv',
mapping=temp(directory(config['results']+'/3.mapping/{chrom}/temp'))
params: dir=directory(config['results']+'/3.mapping/{chrom}')
log: config['results']+'/3.mapping/{chrom}/microMappingPipeline.log'
shell:
......@@ -24,6 +25,7 @@ rule recalcBlatMapped:
input:
allBlat=config['results']+'/3.mapping/{chrom}/allBlat.csv',
summary=config['results']+'/3.mapping/{chrom}/mappingSummary.csv',
mapping=config['results']+'/3.mapping/{chrom}/temp',
refQuery=config['queryFasta'],
faiQuery=config['queryFasta']+'.fai',
refTarget=config['targetFasta'],
......@@ -37,17 +39,20 @@ rule recalcBlatMapped:
"""
rule gtCleanBlatGff:
message: " Clean the gff file recalculated based on Blat fine mapping for chromosome {wildcards.chrom}"
input: config['results']+'/4.recalcBlat/{chrom}/RecalcAnnotOnTarget.gff3'
input: gff=config['results']+'/4.recalcBlat/{chrom}/RecalcAnnotOnTarget.gff3',
mapping=config['results']+'/3.mapping/{chrom}/temp'
output: temp(config['results']+'/4.recalcBlat/{chrom}/RecalcAnnotOnTarget-clean.gff3')
log: config['results']+'/4.recalcBlat/{chrom}/RecalcAnnotOnTarget-clean.log'
shell:
"""
gt gff3 -fixregionboundaries -sort -tidy -retainids {input} 1> {output} 2> {log}
gt gff3 -fixregionboundaries -sort -tidy -retainids {input.gff} 1> {output} 2> {log}
"""
rule gmapRescue:
message: " Rescue anchoring of failed genes with gmap for chrom {wildcards.chrom}"
input: blat=config['results']+'/3.mapping/{chrom}/allBlat.csv', wholeGenomeFasta=config['targetFasta']
input: blat=config['results']+'/3.mapping/{chrom}/allBlat.csv',
wholeGenomeFasta=config['targetFasta'],
mapping=config['results']+'/3.mapping/{chrom}/temp'
output: txt=config['results']+'/4.gmapRescue/{chrom}.txt',
targetgff=temp(config['results']+'/4.gmapRescue/{chrom}.target.gff3'),
wholegenomegff=temp(config['results']+'/4.gmapRescue/{chrom}.wholeGenome.gff3')
......@@ -61,6 +66,7 @@ rule gmapRescue:
rule recalcGmapRescue:
message: "Recalc the coordinates of the GMAP on target GFF3 files for chromosome {wildcards.chrom}"
input: gff=config['results']+'/4.gmapRescue/{chrom}.target.gff3',
mapping=config['results']+'/3.mapping/{chrom}/temp'
output: temp(config['results']+'/4.recalcGmap/{chrom}/recalc.gff3')
params: anchoringDir=config['results']+'/3.mapping/{chrom}',
bindir=os.getcwd()
......@@ -73,7 +79,8 @@ rule recalcGmapRescue:
rule saveGmapWG:
message: "Save the GMAP results of genes mapped on Whole Genome"
input: gff=config['results']+'/4.gmapRescue/{chrom}.wholeGenome.gff3',
map=config['chromMapID']
map=config['chromMapID'],
mapping=config['results']+'/3.mapping/{chrom}/temp'
output: gff=temp(config['results']+'/4.gmapWholeGenome/{chrom}.wholeGenome.gff3'),
gfferror=temp(config['results']+'/4.gmapWholeGenome/{chrom}.wholeGenome_differentChrom.gff3')
log: config['results']+'/4.gmapWholeGenome/{chrom}.wholeGenome.log'
......@@ -88,7 +95,8 @@ rule mergeFinalGff3:
message: " Merge Final GFF3 files: blat.gff3, rescue.gff3 and wholeGenome.gff3"
input: blat=config['results']+'/4.recalcBlat/{chrom}/RecalcAnnotOnTarget-clean.gff3',
rescue=config['results']+'/4.recalcGmap/{chrom}/recalc.gff3',
wg=config['results']+'/4.gmapWholeGenome/{chrom}.wholeGenome.gff3'
wg=config['results']+'/4.gmapWholeGenome/{chrom}.wholeGenome.gff3',
mapping=config['results']+'/3.mapping/{chrom}/temp'
output: annot=temp(config['results']+'/5.FINAL/{chrom}/annotation.gff3')
log: annot=config['results']+'/5.FINAL/{chrom}/annotation.log'
shell:
......
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