Skip to content
Snippets Groups Projects
Commit 1ecac67b authored by Rachel  LEGENDRE's avatar Rachel LEGENDRE
Browse files

Update Snakefile

parent 338dccfc
No related branches found
No related tags found
No related merge requests found
...@@ -236,23 +236,25 @@ if config["star_mapping"]["do"]: ...@@ -236,23 +236,25 @@ if config["star_mapping"]["do"]:
final_output.extend(expand(star_mapping_pass1_junctions, SAMPLE=samples, REF=ref)) final_output.extend(expand(star_mapping_pass1_junctions, SAMPLE=samples, REF=ref))
include: os.path.join(RULES, "star_mapping_pass1.rules") include: os.path.join(RULES, "star_mapping_pass1.rules")
#Second pass mapping if config["star_mapping"]["pass2"] != "none":
star_mapping_pass2_input = adapters_output #Second pass mapping
star_mapping_pass2_done = star_index_output_done star_mapping_pass2_input = adapters_output
star_mapping_pass2_index = star_index_output_dir star_mapping_pass2_done = star_index_output_done
star_mapping_pass2_logs = "02-Mapping/{REF}/STAR/logs/{SAMPLE}_{REF}.out" star_mapping_pass2_index = star_index_output_dir
star_mapping_pass2_output_prefix = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_" star_mapping_pass2_logs = "02-Mapping/{REF}/STAR/logs/{SAMPLE}_{REF}.out"
if config["star_mapping"]["pass2"] == "by-sample": star_mapping_pass2_output_prefix = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_"
star_mapping_pass2_junctions = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_init_SJ.out.tab" if config["star_mapping"]["pass2"] == "by-sample":
elif config["star_mapping"]["pass2"] == "all-samples": star_mapping_pass2_junctions = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_init_SJ.out.tab"
star_mapping_pass2_junctions = expand("02-Mapping/{{REF}}/STAR/{SAMPLE}_{{REF}}_init_SJ.out.tab", SAMPLE=samples) elif config["star_mapping"]["pass2"] == "all-samples":
else: star_mapping_pass2_junctions = expand("02-Mapping/{{REF}}/STAR/{SAMPLE}_{{REF}}_init_SJ.out.tab", SAMPLE=samples)
raise ValueError("Please provides a valid option to pass3 of STAR: must be by-sample, all-samples or none") else:
star_mapping_pass2_bam = star_mapping_pass1_bam raise ValueError("Please provides a valid option to pass2 of STAR: must be by-sample, all-samples or none")
star_mapping_pass2_read_groups = "ID:{SAMPLE}" star_mapping_pass2_bam = star_mapping_pass1_bam
star_mapping_pass2_sort = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_Aligned.sortedByCoord.out.bam" star_mapping_pass2_read_groups = "ID:{SAMPLE}"
final_output.extend(expand(star_mapping_pass2_sort, SAMPLE=samples, REF=ref)) star_mapping_pass2_sort = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_Aligned.sortedByCoord.out.bam"
include: os.path.join(RULES, "star_mapping_pass2.rules")
final_output.extend(expand(star_mapping_pass2_sort, SAMPLE=samples, REF=ref))
include: os.path.join(RULES, "star_mapping_pass2.rules")
......
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