@@ -83,7 +83,7 @@ rule count:
8383 lib = join (workpath , "{sample}_libraries.csv" ),
8484 features = features
8585 output :
86- join (workpath , "{sample}" , "outs" , "web_summary.html" )
86+ html = join (workpath , "{sample}" , "outs" , "web_summary.html" )
8787 log :
8888 err = "run_{sample}_10x_cellranger_count.err" ,
8989 log = "run_{sample}_10x_cellranger_count.log"
@@ -101,17 +101,27 @@ rule count:
101101 # Remove output directory
102102 # prior to running cellranger
103103 if [ -d '{params.prefix}' ]; then
104- rm -rf '{params.prefix}/'
104+ if ! [ -f '{output.html}' ]; then
105+ rm -rf '{params.prefix}/'
106+ cellranger count \\
107+ --id={params.prefix} \\
108+ --transcriptome={params.transcriptome} \\
109+ --libraries={input.lib} \\
110+ --feature-ref={input.features} \\
111+ {params.introns} \\
112+ {params.createbam} \\
113+ 2>{log.err} 1>{log.log}
114+ fi
115+ else
116+ cellranger count \\
117+ --id={params.prefix} \\
118+ --transcriptome={params.transcriptome} \\
119+ --libraries={input.lib} \\
120+ --feature-ref={input.features} \\
121+ {params.introns} \\
122+ {params.createbam} \\
123+ 2>{log.err} 1>{log.log}
105124 fi
106-
107- cellranger count \\
108- --id={params.prefix} \\
109- --transcriptome={params.transcriptome} \\
110- --libraries={input.lib} \\
111- --feature-ref={input.features} \\
112- {params.introns} \\
113- {params.createbam} \\
114- 2>{log.err} 1>{log.log}
115125 """
116126
117127
0 commit comments