Skip to content

Commit

Permalink
Merge pull request #893 from maxplanck-ie/3primeseq_KS
Browse files Browse the repository at this point in the history
3primeseq ks
  • Loading branch information
katsikora committed Apr 21, 2023
2 parents e61c3bd + 3fdd688 commit b38533d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 25 deletions.
6 changes: 4 additions & 2 deletions .ci_stuff/test_dag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 657 ]; then exit 1 ; fi
WC=`mRNA-seq --mode alignment,alignment-free -i PE_input -o output --rMats --sampleSheet .ci_stuff/test_sampleSheet_multiComp.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l`
if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 869 ]; then exit 1 ; fi
# three prime sequencing
WC=`mRNA-seq -i PE_input -o output --three-prime-seq --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l`
if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1332 ]; then exit 1 ; fi
WC=`mRNA-seq -i PE_input -o output --mode three-prime-seq --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l`
if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 618 ]; then exit 1 ; fi
WC=`mRNA-seq -i PE_input -o output --mode three-prime-seq,deepTools_qc --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l`
if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1199 ]; then exit 1 ; fi
#allelic
WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l`
if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1357 ]; then exit 1 ; fi
Expand Down
4 changes: 2 additions & 2 deletions snakePipes/workflows/mRNA-seq/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ else:
include: os.path.join(maindir, "shared", "rules", "featureCounts.snakefile")

# Three Prime Sequencing mode
if "threePrimeSeq" in mode:
if "three-prime-seq" in mode:
include: os.path.join(maindir, "shared", "rules", "three_prime_seq.snakefile")

##Genomic_contamination
Expand Down Expand Up @@ -292,7 +292,7 @@ def run_deepTools_qc():

def run_threePrimeSeq():
file_list = []
if "threePrimeSeq" in mode:
if "three-prime-seq" in mode:
file_list += [
"three_prime_seq/combined_polyA.png",
"three_prime_seq/counts.tsv",
Expand Down
2 changes: 0 additions & 2 deletions snakePipes/workflows/mRNA-seq/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ trimmer: cutadapt
trimmerOptions:

## three prime seq options
## whether to conduct three prime sequencing at all
threePrimeSeq: False
# fastp options for three prime sequencing only
threePrimeTrimmerOptions: -x --poly_x_min_len 6 -3 5 -q 5 -l 20 -y
# STAR fastp options for three prime sequencing only
Expand Down
29 changes: 10 additions & 19 deletions snakePipes/workflows/mRNA-seq/mRNA-seq
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def parse_args(defaults={"verbose": False, "configFile": None,
"fromBAM": False, "bamExt": ".bam", "pairedEnd": True,
"UMIDedup": False,
"UMIDedupOpts": "", "bcPattern": "NNNNCCCCCCCCC",
"UMIDedupSep": "_", "UMIBarcode": False, "rMats": False,
"threePrimeSeq": False}):
"UMIDedupSep": "_", "UMIBarcode": False, "rMats": False}):
"""
Parse arguments from the command line.
"""
Expand All @@ -50,7 +49,7 @@ def parse_args(defaults={"verbose": False, "configFile": None,
# Workflow options
optional = parser.add_argument_group('Options')
optional.add_argument("-m", "--mode",
help="workflow running modes (available: 'alignment-free, alignment, allelic-mapping, deepTools_qc')"
help="workflow running modes (available: 'alignment-free, alignment, allelic-mapping, deepTools_qc, three-prime-seq')"
" (default: '%(default)s')",
default=defaults["mode"])

Expand Down Expand Up @@ -122,13 +121,6 @@ def parse_args(defaults={"verbose": False, "configFile": None,
help="Run differential splicing analysis using rMats-turbo. Note that this flag requires --sampleSheet to be specified.",
default=defaults["rMats"])

optional.add_argument("--three-prime-seq",
dest="three_prime_seq",
action="store_true",
help="Assume library is from 3' sequencing data (e.g. Lexogen QuantSeq 3' mRNA-seq), using "
"methods and scripts codeveloped by Valerie Hilgers, Devon Ryan, and Andrew Rezansoff. ",
default=defaults["threePrimeSeq"])

return parser


Expand Down Expand Up @@ -156,7 +148,7 @@ def main():
args.SNPfile = os.path.abspath(args.SNPfile)
args.NMaskedIndex = os.path.abspath(args.NMaskedIndex)
modeTemp = args.mode.split(",")
validModes = set(["alignment", "alignment-free", "deepTools_qc", "allelic-mapping"])
validModes = set(["alignment", "alignment-free", "deepTools_qc", "allelic-mapping","three-prime-seq"])
for mode in modeTemp:
if mode not in validModes:
sys.exit("{} is not a valid mode!\n".format(mode))
Expand All @@ -168,16 +160,15 @@ def main():
args.aligner = "EXTERNAL_BAM"
if args.rMats and not args.sampleSheet:
sys.exit("--rMats flag requires a sampleSheet (specified with --sampleSheet).\n")
if args.three_prime_seq:
if "three_prime_seq" in mode:
if not args.sampleSheet:
sys.exit("--three-prime-seq requires a sampleSheet "
sys.exit("mode three-prime-seq requires a sampleSheet "
"(specified with --sampleSheet).\n")
args.aligner = "STAR"
args.alignerOptions = defaults['threePrimeAlignerOptions']
args.trimmerOptions = defaults['threePrimeTrimmerOptions']
args.trimmer = "fastp"
args.trim = True
args.mode += ",threePrimeSeq"
aligner = "STAR"
alignerOptions = defaults['threePrimeAlignerOptions']
trimmerOptions = defaults['threePrimeTrimmerOptions']
trimmer = "fastp"
trim = True

## End workflow-specific checks

Expand Down

0 comments on commit b38533d

Please sign in to comment.