1234567891011121314151617181920212223242526272829303132 |
- Data_Dir = config["Data_Dir"]
- Mapping_Dir = config["Mapping_Dir"]
- transcripts = config["transcripts"]
- gene_trans_map = config["gene_trans_map"]
- rule trans_build:
- input:
- transcripts
- output:
- expand(transcripts + ".{index}.bt2", index=range(1, 5)),
- expand(transcripts + ".rev.{index}.bt2", index=range(1,3))
- shell:
- "rsem-prepare-reference --transcript-to-gene-map {gene_trans_map} --bowtie2 {transcripts} {transcripts}"
- rule bowtie2:
- input:
- transcripts,
- expand(transcripts + ".{index}.bt2", index=range(1, 5)),
- expand(transcripts + ".rev.{index}.bt2", index=range(1,3)),
- left = Data_Dir + "/{sample}_1.fq.gz",
- right = Data_Dir + "/{sample}_2.fq.gz"
- output:
- Mapping_Dir + "/{sample}/bowtie2.bam"
- threads: 4
- shell:
- "bowtie2 --no-mixed --no-discordant --gbar 1000 --end-to-end -k 200"
- " -x {transcripts} -1 {input.left} -2 {input.right}"
- " -p {threads}"
- " 2> {Mapping_Dir}/{wildcards.sample}.log | "
- " samtools view -F 4 -S -b | "
- " samtools sort -n -o {Mapping_Dir}/{wildcards.sample}/bowtie2.bam"
|