https://github.com/arjunrajlaboratory/RajLabSeqTools
Tip revision: c8b8c79b2ec9c1bd9eb7ced427bb2aec25f19506 authored by Benjamin Emert on 26 March 2020, 17:37:11 UTC
Updated reorganizeBasespaceFiles.py to better parse samples with same first index (e.g. sample 1 and sample10)
Updated reorganizeBasespaceFiles.py to better parse samples with same first index (e.g. sample 1 and sample10)
Tip revision: c8b8c79
align.smk
def get_fq(wildcards):
if config["trimming"]["skip"]:
# no trimming, use raw reads
return units.loc[(wildcards.sample, wildcards.unit), ["fq1", "fq2"]].dropna()
else:
# yes trimming, use trimmed data
if not is_single_end(**wildcards):
# paired-end sample
return expand("trimmed/{sample}-{unit}.{group}.fastq",
group=[1, 2], **wildcards)
# single end sample
return "trimmed/{sample}-{unit}.fastq".format(**wildcards)
rule align:
input:
sample=get_fq
output:
# see STAR manual for additional output files
"star/{sample}-{unit}/Aligned.out.bam",
"star/{sample}-{unit}/ReadsPerGene.out.tab"
log:
"logs/star/{sample}-{unit}.log"
params:
# path to STAR reference genome index
index=config["ref"]["index"],
# optional parameters
extra="--quantMode GeneCounts --sjdbGTFfile {} {}".format(
config["ref"]["annotation"], config["params"]["star"])
threads: 6
wrapper:
"0.19.4/bio/star/align"