diff --git a/Snakefile b/Snakefile
index 9d727b7e4396e3400d04bdf8599600f5bb059759..5e0fc990c3468e96343ba9c43d6058c206915ce6 100644
--- a/Snakefile
+++ b/Snakefile
@@ -15,35 +15,19 @@ rule all:
 		config['finalPrefix']+'_LC.proteins.fasta',
 		config['finalPrefix']+'_gmap_differentChrom.gff3',
 		config['finalPrefix']+'_anchoringSummary.csv',
-		config['finalPrefix']+'_blatSummary.csv'
+		config['finalPrefix']+'_blatSummary.csv',
+		'report/dag.png',
+		'report/rulegraph.png'
 
-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}
-		"""
 rule createDiagrams:
 	message: "Create dag and rulegraph of the pipeline"
+	output: dag='report/dag.png', rulegraphe='report/rulegraph.png'
 	shell:
 		"""
-		snakemake --dag |dot -T png > report/dag.png
-		snakemake --rulegraph |dot -T png > report/rulegraph.png
+		snakemake --dag |dot -T png > {output.dag}
+		snakemake --rulegraph |dot -T png > {output.rulegraph}
 		"""
+
 include: "rules/preprocessISBP.smk"
 include: "rules/preprocessGenomes.smk"
 include: "rules/bedtoolsClosest.smk"
diff --git a/rules/preprocessGenomes.smk b/rules/preprocessGenomes.smk
index b138847b6c05299500a3ecf035a37dbaa2809c95..5c67eecff86693708842406f1edb9f8b8ae066a3 100644
--- a/rules/preprocessGenomes.smk
+++ b/rules/preprocessGenomes.smk
@@ -1,3 +1,25 @@
+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}
+                """
+
 rule indexQuery:
 	message: " Indexing Query fasta file using samtools faidx"
 	input: config['queryFasta']
@@ -16,4 +38,4 @@ rule gmapIndexTarget:
 	output: directory(config['results']+"/target_gmapindex")
 	params: indexname="target_gmapindex", indexPath=config['results']
 	log: config['results']+"/target_gmapindex.log"
-	shell: "gmap_build -D {params.indexPath} -d {params.indexname} {input} &> {log}"
\ No newline at end of file
+	shell: "gmap_build -D {params.indexPath} -d {params.indexname} {input} &> {log}"