diff --git a/Snakefile b/Snakefile
index 99543ca9a3dcaa45e0ecbec30d1caf68617c7057..441a403b833eac2758e40d79439c6ee4a91370d0 100755
--- a/Snakefile
+++ b/Snakefile
@@ -236,23 +236,25 @@ if config["star_mapping"]["do"]:
     final_output.extend(expand(star_mapping_pass1_junctions, SAMPLE=samples, REF=ref))    
     include: os.path.join(RULES, "star_mapping_pass1.rules")  
     
-    #Second pass mapping
-    star_mapping_pass2_input = adapters_output
-    star_mapping_pass2_done = star_index_output_done
-    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}_"
-    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"
-    final_output.extend(expand(star_mapping_pass2_sort, SAMPLE=samples, REF=ref))    
-    include: os.path.join(RULES, "star_mapping_pass2.rules")   
+    if config["star_mapping"]["pass2"] != "none":
+        #Second pass mapping
+        star_mapping_pass2_input = adapters_output
+        star_mapping_pass2_done = star_index_output_done
+        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}_"
+        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 pass2 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"
+
+        final_output.extend(expand(star_mapping_pass2_sort, SAMPLE=samples, REF=ref))    
+        include: os.path.join(RULES, "star_mapping_pass2.rules")