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

fix issue #35 adding new STAR option

parent 00207f57
No related branches found
No related tags found
No related merge requests found
......@@ -222,10 +222,16 @@ if config["star_mapping"]["do"]:
star_mapping_pass1_input = adapters_output
star_mapping_pass1_done = star_index_output_done
star_mapping_pass1_index = star_index_output_dir
star_mapping_pass1_logs = "02-Mapping/{REF}/STAR/logs/{SAMPLE}_{REF}_init.out"
star_mapping_pass1_output_prefix = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_init_"
star_mapping_pass1_junctions = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_init_SJ.out.tab"
star_mapping_pass1_bam = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_init_Aligned.sortedByCoord.out.bam"
if config["star_mapping"]["pass2"] == "none":
star_mapping_pass1_logs = "02-Mapping/{REF}/STAR/logs/{SAMPLE}_{REF}.out"
star_mapping_pass1_output_prefix = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_"
star_mapping_pass1_junctions = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_SJ.out.tab"
star_mapping_pass1_bam = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_Aligned.sortedByCoord.out.bam"
else :
star_mapping_pass1_logs = "02-Mapping/{REF}/STAR/logs/{SAMPLE}_{REF}_init.out"
star_mapping_pass1_output_prefix = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_init_"
star_mapping_pass1_junctions = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_init_SJ.out.tab"
star_mapping_pass1_bam = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_init_Aligned.sortedByCoord.out.bam"
star_mapping_pass1_read_groups = ""
final_output.extend(expand(star_mapping_pass1_junctions, SAMPLE=samples, REF=ref))
include: os.path.join(RULES, "star_mapping_pass1.rules")
......@@ -236,7 +242,12 @@ if config["star_mapping"]["do"]:
star_mapping_pass2_index = star_index_output_dir
star_mapping_pass2_logs = "02-Mapping/{REF}/STAR/logs/{SAMPLE}_{REF}.out"
star_mapping_pass2_output_prefix = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_"
star_mapping_pass2_junctions = expand("02-Mapping/{{REF}}/STAR/{SAMPLE}_{{REF}}_init_SJ.out.tab", SAMPLE=samples)
if config["star_mapping"]["pass2"] == "by-sample":
star_mapping_pass2_junctions = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_init_SJ.out.tab"
elif config["star_mapping"]["pass2"] == "all-samples":
star_mapping_pass2_junctions = expand("02-Mapping/{{REF}}/STAR/{SAMPLE}_{{REF}}_init_SJ.out.tab", SAMPLE=samples)
else:
raise ValueError("Please provides a valid option to pass3 of STAR: must be by-sample, all-samples or none")
star_mapping_pass2_bam = star_mapping_pass1_bam
star_mapping_pass2_read_groups = "ID:{SAMPLE}"
star_mapping_pass2_sort = "02-Mapping/{REF}/STAR/{SAMPLE}_{REF}_Aligned.sortedByCoord.out.bam"
......
......@@ -135,16 +135,18 @@ bowtie2_mapping:
#
# :Parameters:
#
# - do: if unchecked, this rule is ignored
# - options: any options recognised by bowtie2 tool
# - options: any options recognised by bowtie2 tool. For small genome, STAR may
# abort with segmentation fault. Setting sjdb Over hang to 250 skips this issue
# - pass2: Splice junctions used during pass2 of STAR. Could be "by-sample", "all-samples",
# "none". If "none", no second pass will be done.
# - threads: number of threads to be used
#===============================================================================
star_mapping:
do: yes
# for small genome, STAR may abort with segmentation fault. Setting sjdb Over hang to 250 skips this issue
options: "--outSAMunmapped None "
options: "--outFilterMismatchNoverLmax 0.05 --outSAMunmapped Within "
pass2: "all-samples"
threads: 4
......
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