CDK12/CDK13 inhibition disrupts transcriptional elongation and replication fork progression in glioblastoma.
The 3 matches
- [1] § Methods › SLAM-seq data processing ↔ slamdunk/slamdunk.py, lines 376 to 432 · score 0.63 · SLAMdunk, variant fraction, trimmed, quality, bp, alignment · Report a mismatch
- [2] § Methods › SLAM-seq data processing ↔ slamdunk/dunks/filter.py, lines 213 to 315 · score 0.57 · retention strategy, quality, alignment, SlamDunk, filtering, mapping · Report a mismatch
- [3] § Methods › Cut&Run data processing ↔ slamdunk/dunks/simulator.py, lines 304 to 372 · score 0.52 · samtools view Sb, mapping, sequenced · Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 527 lines · 27 KB · AGPL-3.0 · 1 match
- #!/usr/bin/env python
- # Copyright (c) 2015 Tobias Neumann, Philipp Rescheneder.
- #
- # This file is part of Slamdunk.
- #
- # Slamdunk is free software: you can redistribute it and/or modify
- # it under the terms of the GNU Affero General Public License as
- # published by the Free Software Foundation, either version 3 of the
- # License, or (at your option) any later version.
- #
- # Slamdunk is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU Affero General Public License for more details.
- #
- # You should have received a copy of the GNU Affero General Public License
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
- #########################################################################
- # Main routine for the SLAMdunk analyzer
- #########################################################################
- # Imports
- #########################################################################
- from __future__ import print_function
- import sys, os, random
- from time import sleep
- from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter, SUPPRESS
- from os.path import basename
- from joblib import Parallel, delayed
- from slamdunk.dunks import tcounter, mapper, filter, deduplicator, snps
- from slamdunk.utils.misc import replaceExtension, estimateMaxReadLength
- from slamdunk.version import __version__
- ########################################################################
- # Global variables
- ########################################################################
- printOnly = False
- verbose = False
- mainOutput = sys.stderr
- logToMainOutput = False
- ########################################################################
- # Routine definitions
- ########################################################################
- def getLogFile(path):
- if(logToMainOutput):
- return mainOutput
- else:
- log = open(path, "a")
- return log
- def closeLogFile(log):
- if(not logToMainOutput):
- log.close()
- def message(msg):
- print(msg, file=mainOutput)
- def error(msg, code=-1):
- print(msg, file=mainOutput)
- sys.exit(code)
- def stepFinished():
- print(".", end="", file=mainOutput)
- def dunkFinished():
- print("", file=mainOutput)
- def createDir(directory):
- if not os.path.exists(directory):
- message("Creating output directory: " + directory)
- os.makedirs(directory)
- def readSampleFile(fileName):
- samples = []
- infos = []
- with open(fileName, "r") as ins:
- for line in ins:
- line = line.strip()
- if(len(line) > 1):
- if(fileName.endswith(".tsv")):
- cols = line.split("\t")
- elif(fileName.endswith(".csv")):
- cols = line.split(",")
- else:
- raise RuntimeError("Unknown file extension found: " + fileName)
- if(len(cols) < 4):
- raise RuntimeError("Invalid sample file found: " + fileName)
- samples.append(cols[0])
- infos.append(cols[1] + ":" + cols[2] + ":" + cols[3])
- return samples, infos
- def getSamples(bams, runOnly=-1):
- samples = []
- samplesInfos = []
- if len(bams) == 1 and (bams[0].endswith(".tsv") or bams[0].endswith(".csv")):
- # Sample file specified
- samples, samplesInfos = readSampleFile(bams[0])
- else:
- # List of BAM files specified
- samples = bams
- samplesInfos = [""] * len(samples)
- if(runOnly > 0):
- if(runOnly > len(samples)):
- raise RuntimeError("Sample index out of range. " + str(runOnly) + " > " + str(len(samples)) + ". Check -i/--sample-index")
- message("Running only job " + str(runOnly))
- samples = [ samples[runOnly - 1] ]
- samplesInfos = [ samplesInfos[runOnly - 1] ]
- elif(runOnly == 0):
- raise RuntimeError("Sample index (" + str(runOnly) + ") out of range. Starts with 1. Check -i/--sample-index")
- return samples, samplesInfos
- def runMap(tid, inputBAM, referenceFile, threads, trim5p, maxPolyA, quantseqMapping, endtoendMapping, topn, sampleDescription, outputDirectory, skipSAM) :
- if skipSAM:
- outputSAM = os.path.join(outputDirectory, replaceExtension(basename(inputBAM), ".bam", "_slamdunk_mapped"))
- else:
- outputSAM = os.path.join(outputDirectory, replaceExtension(basename(inputBAM), ".sam", "_slamdunk_mapped"))
- outputLOG = os.path.join(outputDirectory, replaceExtension(basename(inputBAM), ".log", "_slamdunk_mapped"))
- #sampleName = "sample_" + str(tid)
- sampleName = replaceExtension(basename(inputBAM), ".bam", "")
- sampleType = "NA"
- sampleTime = "-1"
- if(sampleDescription != ""):
- sampleDescriptions = sampleDescription.split(":")
- if(len(sampleDescriptions) >= 1):
- sampleName = sampleDescriptions[0]
- if(len(sampleDescriptions) >= 2):
- typeDict = { 'p': 'pulse', 'c':'chase', 'pulse':'pulse', 'chase':'chase', '':'NA'}
- if sampleDescriptions[1] in typeDict:
- sampleType = typeDict[sampleDescriptions[1]]
- else:
- sampleType = sampleDescriptions[1]
- if(len(sampleDescriptions) >= 3):
- sampleTime = sampleDescriptions[2]
- mapper.Map(inputBAM, referenceFile, outputSAM, getLogFile(outputLOG), quantseqMapping, endtoendMapping, threads=threads, trim5p=trim5p, maxPolyA=maxPolyA, topn=topn, sampleId=tid, sampleName=sampleName, sampleType=sampleType, sampleTime=sampleTime, printOnly=printOnly, verbose=verbose)
- stepFinished()
- def runSam2Bam(tid, bam, threads, outputDirectory):
- inputSAM = os.path.join(outputDirectory, replaceExtension(basename(bam), ".sam", "_slamdunk_mapped"))
- outputBAM = os.path.join(outputDirectory, replaceExtension(basename(bam), ".bam", "_slamdunk_mapped"))
- outputLOG = os.path.join(outputDirectory, replaceExtension(basename(bam), ".log", "_slamdunk_mapped"))
- mapper.sort(inputSAM, outputBAM, getLogFile(outputLOG), threads, False, printOnly, verbose)
- stepFinished()
- def runDedup(tid, bam, outputDirectory) :
- outputBAM = os.path.join(outputDirectory, replaceExtension(basename(bam), ".bam", "_dedup"))
- outputLOG = os.path.join(outputDirectory, replaceExtension(basename(bam), ".log", "_dedup"))
- log = getLogFile(outputLOG)
- deduplicator.Dedup(bam, outputBAM, log)
- closeLogFile(log)
- stepFinished()
- def runFilter(tid, bam, bed, mq, minIdentity, maxNM, outputDirectory):
- outputBAM = os.path.join(outputDirectory, replaceExtension(basename(bam), ".bam", "_filtered"))
- outputLOG = os.path.join(outputDirectory, replaceExtension(basename(bam), ".log", "_filtered"))
- filter.Filter(bam, outputBAM, getLogFile(outputLOG), bed, mq, minIdentity, maxNM, printOnly, verbose)
- stepFinished()
- def runSnp(tid, referenceFile, minCov, minVarFreq, minQual, inputBAM, outputDirectory) :
- outputSNP = os.path.join(outputDirectory, replaceExtension(basename(inputBAM), ".vcf", "_snp"))
- outputLOG = os.path.join(outputDirectory, replaceExtension(basename(inputBAM), ".log", "_snp"))
- snps.SNPs(inputBAM, outputSNP, referenceFile, minVarFreq, minCov, minQual, getLogFile(outputLOG), printOnly, verbose, False)
- stepFinished()
- def runCount(tid, bam, ref, bed, maxLength, minQual, conversionThreshold, outputDirectory, snpDirectory, vcfFile) :
- outputCSV = os.path.join(outputDirectory, replaceExtension(basename(bam), ".tsv", "_tcount"))
- outputBedgraphPlus = os.path.join(outputDirectory, replaceExtension(basename(bam), ".bedgraph", "_tcount_plus"))
- outputBedgraphMinus = os.path.join(outputDirectory, replaceExtension(basename(bam), ".bedgraph", "_tcount_mins"))
- outputLOG = os.path.join(outputDirectory, replaceExtension(basename(bam), ".log", "_tcount"))
- if (vcfFile != None) :
- inputSNP = vcfFile
- elif(snpDirectory != None):
- inputSNP = os.path.join(snpDirectory, replaceExtension(basename(bam), ".vcf", "_snp"))
- else:
- inputSNP = None
- if (maxLength == None) :
- maxLength = estimateMaxReadLength(bam)
- if (maxLength < 0) :
- print("Difference between minimum and maximum read length is > 10. Please specify --max-read-length parameter.")
- sys.exit(0)
- log = getLogFile(outputLOG)
- print("Using " + str(maxLength) + " as maximum read length.",file=log)
- tcounter.computeTconversions(ref, bed, inputSNP, bam, maxLength, minQual, outputCSV, outputBedgraphPlus, outputBedgraphMinus, conversionThreshold, log)
- stepFinished()
- return outputCSV
- def runAll(args) :
- message("slamdunk all")
- if args.sampleIndex > -1:
- sec = random.randrange(200,2000) / 1000.0
- message("Waiting " + str(sec) + " seconds")
- sleep(sec)
- # Setup slamdunk run folder
- outputDirectory = args.outputDir
- createDir(outputDirectory)
- n = args.threads
- referenceFile = args.referenceFile
- # Run mapper dunk
- dunkPath = os.path.join(outputDirectory, "map")
- createDir(dunkPath)
- samples, samplesInfos = getSamples(args.files, runOnly=args.sampleIndex)
- message("Running slamDunk map for " + str(len(samples)) + " files (" + str(n) + " threads)")
- for i in range(0, len(samples)):
- bam = samples[i]
- if not args.sampleName or len(samples) > 1:
- sampleName = replaceExtension(basename(bam), "", "")
- else :
- sampleName = args.sampleName
- sampleInfo = samplesInfos[i]
- if sampleInfo == "":
- sampleInfo = sampleName + ":" + args.sampleType + ":" + str(args.sampleTime)
- tid = i
- if args.sampleIndex > -1:
- tid = args.sampleIndex
- runMap(tid, bam, referenceFile, n, args.trim5, args.maxPolyA, args.quantseq, args.endtoend, args.topn, sampleInfo, dunkPath, args.skipSAM)
- dunkFinished()
- if(not args.skipSAM):
- message("Running slamDunk sam2bam for " + str(len(samples)) + " files (" + str(n) + " threads)")
- results = Parallel(n_jobs=1, verbose=verbose)(delayed(runSam2Bam)(tid, samples[tid], n, dunkPath) for tid in range(0, len(samples)))
- dunkFinished()
- dunkbufferIn = []
- for file in samples :
- dunkbufferIn.append(os.path.join(dunkPath, replaceExtension(basename(file), ".bam", "_slamdunk_mapped")))
- # Run filter dunk
- bed = args.bed
- if args.filterbed:
- bed = args.filterbed
- args.multimap = True
- if (not args.multimap) :
- bed = None
- dunkPath = os.path.join(outputDirectory, "filter")
- createDir(dunkPath)
- message("Running slamDunk filter for " + str(len(samples)) + " files (" + str(n) + " threads)")
- results = Parallel(n_jobs=n, verbose=verbose)(delayed(runFilter)(tid, dunkbufferIn[tid], bed, args.mq, args.identity, args.nm, dunkPath) for tid in range(0, len(samples)))
- dunkFinished()
- # Run filter dunk
- dunkbufferOut = []
- for file in dunkbufferIn :
- dunkbufferOut.append(os.path.join(dunkPath, replaceExtension(basename(file), ".bam", "_filtered")))
- dunkbufferIn = dunkbufferOut
- dunkbufferOut = []
- dunkFinished()
- # Run snps dunk only if vcf not specified
- snpDirectory = None
- vcfFile = None
- if not "vcfFile" in args:
- dunkPath = os.path.join(outputDirectory, "snp")
- createDir(dunkPath)
- minCov = args.cov
- minVarFreq = args.var
- snpThread = n
- if(snpThread > 1):
- snpThread = int(snpThread / 2)
- #if (args.minQual == 0) :
- # snpqual = 13
- #else :
- snpqual = args.minQual
- message("Running slamDunk SNP for " + str(len(samples)) + " files (" + str(snpThread) + " threads)")
- results = Parallel(n_jobs=snpThread, verbose=verbose)(delayed(runSnp)(tid, referenceFile, minCov, minVarFreq, snpqual, dunkbufferIn[tid], dunkPath) for tid in range(0, len(samples)))
- snpDirectory = os.path.join(outputDirectory, "snp")
- dunkFinished()
- else :
- vcfFile = args.vcfFile
- # Run count dunk
- dunkPath = os.path.join(outputDirectory, "count")
- createDir(dunkPath)
- message("Running slamDunk tcount for " + str(len(samples)) + " files (" + str(n) + " threads)")
- results = Parallel(n_jobs=n, verbose=verbose)(delayed(runCount)(tid, dunkbufferIn[tid], referenceFile, args.bed, args.maxLength, args.minQual, args.conversionThreshold, dunkPath, snpDirectory, vcfFile) for tid in range(0, len(samples)))
- dunkFinished()
- def run():
- ########################################################################
- # Argument parsing
- ########################################################################
- # Info
- usage = "SLAMdunk software for analyzing SLAM-seq data"
- # Main Parsers
- parser = ArgumentParser(description=usage, formatter_class=ArgumentDefaultsHelpFormatter)
- parser.add_argument('--version', action='version', version='%(prog)s ' + __version__)
- # Initialize Subparsers
- subparsers = parser.add_subparsers(help="", dest="command")
- # map command
- mapparser = subparsers.add_parser('map', help='Map SLAM-seq read data', formatter_class=ArgumentDefaultsHelpFormatter)
- mapparser.add_argument('files', action='store', help='Single csv/tsv file (recommended) containing all sample files and sample info or a list of all sample BAM/FASTA(gz)/FASTQ(gz) files' , nargs="+")
- mapparser.add_argument("-r", "--reference", type=str, required=True, dest="referenceFile", default=SUPPRESS, help="Reference fasta file")
- mapparser.add_argument("-o", "--outputDir", type=str, required=True, dest="outputDir", default=SUPPRESS, help="Output directory for mapped BAM files.")
- mapparser.add_argument("-5", "--trim-5p", type=int, required=False, dest="trim5", default=12, help="Number of bp removed from 5' end of all reads.")
- mapparser.add_argument("-n", "--topn", type=int, required=False, dest="topn", default=1, help="Max. number of alignments to report per read")
- mapparser.add_argument("-a", "--max-polya", type=int, required=False, dest="maxPolyA", default=4, help="Max number of As at the 3' end of a read.")
- mapparser.add_argument("-t", "--threads", type=int, required=False, dest="threads", default = 1, help="Thread number")
- mapparser.add_argument("-q", "--quantseq", dest="quantseq", action='store_true', required=False, help="Run plain Quantseq alignment without SLAM-seq scoring")
- mapparser.add_argument('-e', "--endtoend", action='store_true', dest="endtoend", help="Use a end to end alignment algorithm for mapping.")
- mapparser.add_argument('-sn', "--sampleName", type=str, dest="sampleName", required = False, help="Use this sample name for all supplied samples")
- mapparser.add_argument('-sy', "--sampleType", type=str, dest="sampleType", required = False, default = "pulse", help="Use this sample type for all supplied samples")
- mapparser.add_argument('-st', "--sampleTime", type=int, dest="sampleTime", required = False, default = 0, help="Use this sample time for all supplied samples")
- mapparser.add_argument("-i", "--sample-index", type=int, required=False, default=-1, dest="sampleIndex", help="Run analysis only for sample <i>. Use for distributing slamdunk analysis on a cluster (index is 1-based).")
- mapparser.add_argument('-ss', "--skip-sam", action='store_true', dest="skipSAM", help="Output BAM while mapping. Slower but, uses less hard disk.")
- # filter command
- filterparser = subparsers.add_parser('filter', help='Filter SLAM-seq aligned data')
- filterparser.add_argument('bam', action='store', help='Bam file(s)' , nargs="+")
- filterparser.add_argument("-o", "--outputDir", type=str, required=True, dest="outputDir", help="Output directory for mapped BAM files.")
- filterparser.add_argument("-b", "--bed", type=str, required=False, dest="bed", help="BED file, overrides MQ filter to 0")
- filterparser.add_argument("-mq", "--min-mq", type=int, required=False, default=2, dest="mq", help="Minimum mapping quality (default: %(default)d)")
- filterparser.add_argument("-mi", "--min-identity", type=float, required=False, default=0.95, dest="identity", help="Minimum alignment identity (default: %(default)s)")
- filterparser.add_argument("-nm", "--max-nm", type=int, required=False, default=-1, dest="nm", help="Maximum NM for alignments (default: %(default)d)")
- filterparser.add_argument("-t", "--threads", type=int, required=False, dest="threads", default=1, help="Thread number (default: %(default)d)")
- # snp command
- snpparser = subparsers.add_parser('snp', help='Call SNPs on SLAM-seq aligned data', formatter_class=ArgumentDefaultsHelpFormatter)
- snpparser.add_argument('bam', action='store', help='Bam file(s)' , nargs="+")
- snpparser.add_argument("-o", "--outputDir", type=str, required=True, dest="outputDir", default=SUPPRESS, help="Output directory for mapped BAM files.")
- snpparser.add_argument("-r", "--reference", required=True, dest="fasta", type=str, default=SUPPRESS, help="Reference fasta file")
- snpparser.add_argument("-c", "--min-coverage", required=False, dest="cov", type=int, help="Minimimum coverage to call variant", default=10)
- #snpparser.add_argument("-q", "--min-base-qual", type=int, default=13, required=False, dest="minQual", help="Min base quality for T -> C conversions (default: %(default)d)")
- snpparser.add_argument("-f", "--var-fraction", required=False, dest="var", type=float, help="Minimimum variant fraction to call variant", default=0.8)
- snpparser.add_argument("-t", "--threads", type=int, required=False, default=1, dest="threads", help="Thread number")
- # count command
- countparser = subparsers.add_parser('count', help='Count T/C conversions in SLAM-seq aligned data')
- countparser.add_argument('bam', action='store', help='Bam file(s)' , nargs="+")
- countparser.add_argument("-o", "--outputDir", type=str, required=True, dest="outputDir", default=SUPPRESS, help="Output directory for mapped BAM files.")
- countparser.add_argument("-s", "--snp-directory", type=str, required=False, dest="snpDir", default=SUPPRESS, help="Directory containing SNP files.")
- countparser.add_argument("-v", "--vcf", type=str, required=False, dest="vcfFile", default=SUPPRESS, help="Externally provided custom variant file.")
- countparser.add_argument("-r", "--reference", type=str, required=True, dest="ref", default=SUPPRESS, help="Reference fasta file")
- countparser.add_argument("-b", "--bed", type=str, required=True, dest="bed", default=SUPPRESS, help="BED file")
- countparser.add_argument("-c", "--conversion-threshold", type=int, dest="conversionThreshold", required=False, default=1,help="Number of T>C conversions required to count read as T>C read (default: %(default)d)")
- countparser.add_argument("-l", "--max-read-length", type=int, required=False, dest="maxLength", help="Max read length in BAM file")
- countparser.add_argument("-q", "--min-base-qual", type=int, default=27, required=False, dest="minQual", help="Min base quality for T -> C conversions (default: %(default)d)")
- countparser.add_argument("-t", "--threads", type=int, required=False, default=1, dest="threads", help="Thread number (default: %(default)d)")
- # all command
- allparser = subparsers.add_parser('all', help='Run entire SLAMdunk analysis')
- allparser.add_argument('files', action='store', help='Single csv/tsv file (recommended) containing all sample files and sample info or a list of all sample BAM/FASTA(gz)/FASTQ(gz) files' , nargs="+")
- allparser.add_argument("-r", "--reference", type=str, required=True, dest="referenceFile", help="Reference fasta file")
- allparser.add_argument("-b", "--bed", type=str, required=True, dest="bed", help="BED file with 3'UTR coordinates")
- allparser.add_argument("-fb", "--filterbed", type=str, required=False, dest="filterbed", help="BED file with 3'UTR coordinates to filter multimappers (activates -m)")
- allparser.add_argument("-v", "--vcf", type=str, required=False, dest="vcfFile", default=SUPPRESS, help="Skip SNP step and provide custom variant file.")
- allparser.add_argument("-o", "--outputDir", type=str, required=True, dest="outputDir", help="Output directory for slamdunk run.")
- allparser.add_argument("-5", "--trim-5p", type=int, required=False, dest="trim5", default=12, help="Number of bp removed from 5' end of all reads (default: %(default)s)")
- allparser.add_argument("-a", "--max-polya", type=int, required=False, dest="maxPolyA", default=4, help="Max number of As at the 3' end of a read (default: %(default)s)")
- allparser.add_argument("-n", "--topn", type=int, required=False, dest="topn", default=1, help="Max. number of alignments to report per read (default: %(default)s)")
- allparser.add_argument("-t", "--threads", type=int, required=False, default=1, dest="threads", help="Thread number (default: %(default)s)")
- allparser.add_argument("-q", "--quantseq", dest="quantseq", action='store_true', required=False, help="Run plain Quantseq alignment without SLAM-seq scoring")
- allparser.add_argument('-e', "--endtoend", action='store_true', dest="endtoend", help="Use a end to end alignment algorithm for mapping.")
- allparser.add_argument('-m', "--multimap", action='store_true', dest="multimap", help="Use reference to resolve multimappers (requires -n > 1).")
- allparser.add_argument("-mq", "--min-mq", type=int, required=False, default=2, dest="mq", help="Minimum mapping quality (default: %(default)s)")
- allparser.add_argument("-mi", "--min-identity", type=float, required=False, default=0.95, dest="identity", help="Minimum alignment identity (default: %(default)s)")
- allparser.add_argument("-nm", "--max-nm", type=int, required=False, default=-1, dest="nm", help="Maximum NM for alignments (default: %(default)s)")
- allparser.add_argument("-mc", "--min-coverage", required=False, dest="cov", type=int, help="Minimimum coverage to call variant (default: %(default)s)", default=10)
- allparser.add_argument("-mv", "--var-fraction", required=False, dest="var", type=float, help="Minimimum variant fraction to call variant (default: %(default)s)", default=0.8)
- allparser.add_argument("-c", "--conversion-threshold", type=int, dest="conversionThreshold", required=False, default=1,help="Number of T>C conversions required to count read as T>C read (default: %(default)d)")
- allparser.add_argument("-rl", "--max-read-length", type=int, required=False, dest="maxLength", help="Max read length in BAM file")
- allparser.add_argument("-mbq", "--min-base-qual", type=int, default=27, required=False, dest="minQual", help="Min base quality for T -> C conversions (default: %(default)d)")
- allparser.add_argument('-sn', "--sampleName", type=str, dest="sampleName", required = False, help="Use this sample name for all supplied samples")
- allparser.add_argument('-sy', "--sampleType", type=str, dest="sampleType", required = False, default = "pulse", help="Use this sample type for all supplied samples")
- allparser.add_argument('-st', "--sampleTime", type=int, dest="sampleTime", required = False, default = 0, help="Use this sample time for all supplied samples")
- allparser.add_argument("-i", "--sample-index", type=int, required=False, default=-1, dest="sampleIndex", help="Run analysis only for sample <i>. Use for distributing slamdunk analysis on a cluster (index is 1-based).")
- allparser.add_argument("-ss", "--skip-sam", action='store_true', dest="skipSAM", help="Output BAM while mapping. Slower but, uses less hard disk.")
- args = parser.parse_args()
- ########################################################################
- # Routine selection
- ########################################################################
- command = args.command
- if (command == "map") :
- mapper.checkNextGenMapVersion()
- outputDirectory = args.outputDir
- if args.sampleIndex > -1:
- sec = random.randrange(0,2000) / 1000
- message("Waiting " + str(sec) + " seconds")
- sleep(sec)
- createDir(outputDirectory)
- n = args.threads
- referenceFile = args.referenceFile
- samples, samplesInfos = getSamples(args.files, runOnly=args.sampleIndex)
- message("Running slamDunk map for " + str(len(samples)) + " files (" + str(n) + " threads)")
- for i in range(0, len(samples)):
- bam = samples[i]
- if not args.sampleName or len(samples) > 1:
- sampleName = replaceExtension(basename(bam), "", "")
- else :
- sampleName = args.sampleName
- sampleInfo = samplesInfos[i]
- if sampleInfo == "":
- sampleInfo = sampleName + ":" + args.sampleType + ":" + str(args.sampleTime)
- tid = i
- if args.sampleIndex > -1:
- tid = args.sampleIndex
- runMap(tid, bam, referenceFile, n, args.trim5, args.maxPolyA, args.quantseq, args.endtoend, args.topn, sampleInfo, outputDirectory, args.skipSAM)
- dunkFinished()
- if not args.skipSAM:
- message("Running slamDunk sam2bam for " + str(len(samples)) + " files (" + str(n) + " threads)")
- results = Parallel(n_jobs=1, verbose=verbose)(delayed(runSam2Bam)(tid, samples[tid], n, outputDirectory) for tid in range(0, len(samples)))
- dunkFinished()
- elif (command == "filter") :
- outputDirectory = args.outputDir
- createDir(outputDirectory)
- n = args.threads
- message("Running slamDunk filter for " + str(len(args.bam)) + " files (" + str(n) + " threads)")
- results = Parallel(n_jobs=n, verbose=verbose)(delayed(runFilter)(tid, args.bam[tid], args.bed, args.mq, args.identity, args.nm, outputDirectory) for tid in range(0, len(args.bam)))
- dunkFinished()
- elif (command == "snp") :
- outputDirectory = args.outputDir
- createDir(outputDirectory)
- fasta = args.fasta
- minCov = args.cov
- minVarFreq = args.var
- #minQual = args.minQual
- minQual = 15
- n = args.threads
- if(n > 1):
- n = int(n / 2)
- message("Running slamDunk SNP for " + str(len(args.bam)) + " files (" + str(n) + " threads)")
- results = Parallel(n_jobs=n, verbose=verbose)(delayed(runSnp)(tid, fasta, minCov, minVarFreq, minQual, args.bam[tid], outputDirectory) for tid in range(0, len(args.bam)))
- dunkFinished()
- elif (command == "count") :
- outputDirectory = args.outputDir
- createDir(outputDirectory)
- if "snpDir" in args:
- snpDirectory = args.snpDir
- else :
- snpDirectory = None
- if "vcfFile" in args:
- vcfFile = args.vcfFile
- else :
- vcfFile = None
- n = args.threads
- message("Running slamDunk tcount for " + str(len(args.bam)) + " files (" + str(n) + " threads)")
- results = Parallel(n_jobs=n, verbose=verbose)(delayed(runCount)(tid, args.bam[tid], args.ref, args.bed, args.maxLength, args.minQual, args.conversionThreshold, outputDirectory, snpDirectory, vcfFile) for tid in range(0, len(args.bam)))
- dunkFinished()
- elif (command == "all") :
- runAll(args)
- dunkFinished()
- else:
- parser.error("Too few arguments.")
- if __name__ == '__main__':
- run()
slamdunk.py at commit 14270e5, under AGPL-3.0 · at the source
Overview
and 10 other authors
Ashish Anand11, Steven M Pollard12, Stig O Bøe1,3, Johanne E Rinholm1,2, Katrin B M Frauenknecht4,13, Anna Golebiewska5, Simone P Niclou5,14, Kumar Somyajit10, Mads Lerdrup3,6, Deo P Pandey1,314 affiliations
- Department of Microbiology, Rikshospitalet, Oslo University Hospital, Oslo, Norway
- Institute of Basic Medical Sciences and Institute of Clinical Medicine, University of Oslo, Oslo, Norway
- CRESCO, Centre for Embryology and Healthy Development, University of Oslo, Oslo, Norway
- Institute of Neuropathology, University Medical Center, Johannes Gutenberg University Mainz, Mainz, Germany
- NORLUX Neuro-Oncology Laboratory, Department of Cancer Research, Luxembourg Institute of Health, Strassen, Luxembourg
- Center for Chromosome Stability, Department of Cellular and Molecular Medicine, University of Copenhagen, Copenhagen, Denmark
- Department of Core Facilities, Institute for Cancer Research, Oslo University Hospital, Oslo, Norway
- National Institute of technology, Silchar, India
- Division of Biological Sciences, University of Missouri, Columbia, 65211 MO USA
- Department of Biochemistry and Molecular Biology, University of Southern Denmark, Odense, Denmark
- Department of Computer Science and Engineering, Indian Institute of Technology, Guwahati, Assam India
- Institute for Regeneration and Repair & Cancer Research UK Scotland Centre, Edinburgh, United Kingdom
- National Center of Pathology, Laboratoire national de santé, Dudelange, Luxembourg
- Department of Life Sciences and Medicine, University of Luxembourg, Belval, Luxembourg
Abstract
Glioblastomas are the most prevalent and aggressive malignant brain tumors, characterized by hypertranscription and dependence on neurodevelopmental transcription factors. The transcriptional cycle is regulated by phosphorylation of the C-terminal domain (CTD) of RNA polymerase II (RNAPII) by transcriptional cyclin-dependent kinases (tCDKs), including CDK7, CDK9, CDK12, and CDK13. Here we find that glioblastoma stem cells (GSCs) are selectively sensitive to CDK12/
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 3 matches between paragraphs and lines of code.
t-neumann/slamdunk
14270e5794d36270f601a88c0bf369899d8ab4a0, 25 April 2024Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
52 files
- bin/
_preamble.py , Python, 27 lines - setup.py, Python, 170 lines
- slamdunk/
__init__.py , Python, 1 line - slamdunk/
alleyoop.py , Python, 603 lines - slamdunk/
contrib/ , Shell, 79 linesRNASeqReadSimulator/ demo/ genpairedendreads.sh - slamdunk/
contrib/ , Shell, 72 linesRNASeqReadSimulator/ demo/ gensingleendreads.sh - slamdunk/
contrib/ , Shell, 72 linesRNASeqReadSimulator/ demo/ genstrandedreads.sh - slamdunk/
contrib/ , Python, 87 linesRNASeqReadSimulator/ src/ addvariation2splicingbed .py - slamdunk/
contrib/ , Python, 177 linesRNASeqReadSimulator/ src/ genexplvprofile.py - slamdunk/
contrib/ , Python, 313 linesRNASeqReadSimulator/ src/ gensimreads.py - slamdunk/
contrib/ , Python, 99 linesRNASeqReadSimulator/ src/ getSegs.py - slamdunk/
contrib/ , Python, 207 linesRNASeqReadSimulator/ src/ getseqfrombed.py - slamdunk/
contrib/ , Python, 41 linesRNASeqReadSimulator/ src/ splitfasta.py - slamdunk/
dunks/ , Python, 1 line__init__.py - slamdunk/
dunks/ , Python, 94 linesdeduplicator.py - slamdunk/
dunks/ , Python, 48 linesdump.py - slamdunk/
dunks/ , Python, 315 lines, 1 matchfilter.py - slamdunk/
dunks/ , Python, 109 linesmapper.py - slamdunk/
dunks/ , Python, 485 lines, 1 matchsimulator.py - slamdunk/
dunks/ , Python, 55 linessnps.py - slamdunk/
dunks/ , Python, 858 linesstats.py - slamdunk/
dunks/ , Python, 529 linestcounter.py - slamdunk/
plot/ , R, 92 linesPCAPlotter.R - slamdunk/
plot/ , R, 182 linesSNPeval.R - slamdunk/
plot/ , Python, 1 line__init__.py - slamdunk/
plot/ , R, 27 linescheckLibraries.R - slamdunk/
plot/ , R, 89 linescompute_context_TC_rates .R - slamdunk/
plot/ , R, 153 linescompute_conversion_rate_ mle.R - slamdunk/
plot/ , R, 131 linescompute_halflifes.R - slamdunk/
plot/ , R, 109 linescompute_overall_rates.R - slamdunk/
plot/ , R, 141 linescompute_sample_compariso n_statistics.R - slamdunk/
plot/ , R, 88 linesconversion_per_read_posi tion.R - slamdunk/
plot/ , R, 100 lineseval_conversion_rate_plo ts.R - slamdunk/
plot/ , R, 175 lineseval_halflife_per_gene_p lots.R - slamdunk/
plot/ , R, 137 lineseval_halflifes_error_plo t.R - slamdunk/
plot/ , R, 192 linesglobalRatePlotter.R - slamdunk/
plot/ , R, 145 linesmerge_rate_files.R - slamdunk/
plot/ , R, 126 linessplash_eval_count_files. R - slamdunk/
slamdunk.py , Python, 527 lines, 1 match - slamdunk/
slamseq/ , Python, 475 linesSlamSeqFile.py - slamdunk/
slamseq/ , Python, 1 line__init__.py - slamdunk/
splash.py , Python, 405 lines - slamdunk/
test/ , Python, 1 line__init__.py - slamdunk/
test/ , Python, 9 linestest_sample.py - slamdunk/
test/ , Shell, 7 linestest_sample.sh - slamdunk/
utils/ , Python, 84 linesBedReader.py - slamdunk/
utils/ , Python, 74 linesSNPtools.py - slamdunk/
utils/ , Python, 1 line__init__.py - slamdunk/
utils/ , Python, 296 linesmisc.py - slamdunk/
version.py , Python, 25 lines - LICENSE, License, 661 lines
- README.md, Text, 33 lines
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 50 scripts, each with its path and the digest of its content;
- 3 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- geo:GSE186311, at NCBI GEO; found in “Data availability”
Other data links
- ebi.ac.uk/
biostudies/ , EMBL-EBI; found in the text, “Author contributions”sourcedata
Data availability
The datasets produced in this study are available in the following databases: Cut&
The source data of this paper are collected in the following database record: biostudies:S-SCDT-10_103
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 30 authors, 7 keywords, 12 MeSH terms, 7 funders, 76 references, 4 RRIDs.
Cite
This paper
Lier, S., Markusson, S. B., Kocijancic, A., Narum, M., Lund, S. O., Böllering, B., Lipsa, A., Søegaard, M. L. C., Rein, I. D., Santha, P., Jain, P., Lång, A., Lång, E., Meyer, N., Dutta, A., Anand, S., Badugu, S. B., Nesse, G. J., Forstrøm, R. J., . . . Pandey, D. P. (2026). CDK12/
BibTeX
@article{lier2026cdk12,
author = {Lier, Silje and Markusson, Sara B and Kocijancic, Anja and Narum, Martine and Lund, Solveig O and Böllering, Bianka and Lipsa, Anuja and Søegaard, Mirra L C and Rein, Idun D and Santha, Petra and Jain, Preeti and Lång, Anna and Lång, Emma and Meyer, Niklas and Dutta, Aparajita and Anand, Santosh and Badugu, Sugith B and Nesse, Gaute J and Forstrøm, Rune J and Klungland, Arne and Anand, Ashish and Pollard, Steven M and Bøe, Stig O and Rinholm, Johanne E and Frauenknecht, Katrin B M and Golebiewska, Anna and Niclou, Simone P and Somyajit, Kumar and Lerdrup, Mads and Pandey, Deo P},
title = {{CDK12/
journal = {EMBO molecular medicine},
year = {2026},
month = mar,
volume = {18},
number = {5},
pages = {1592--1624},
publisher = {Nature Publishing Group},
issn = {1757-4676},
doi = {10.1038/
url = {https://
pmid = {41882177},
pmcid = {PMC13179391}
}
RIS
TY - JOUR
AU - Lier, Silje
AU - Markusson, Sara B
AU - Kocijancic, Anja
AU - Narum, Martine
AU - Lund, Solveig O
AU - Böllering, Bianka
AU - Lipsa, Anuja
AU - Søegaard, Mirra L C
AU - Rein, Idun D
AU - Santha, Petra
AU - Jain, Preeti
AU - Lång, Anna
AU - Lång, Emma
AU - Meyer, Niklas
AU - Dutta, Aparajita
AU - Anand, Santosh
AU - Badugu, Sugith B
AU - Nesse, Gaute J
AU - Forstrøm, Rune J
AU - Klungland, Arne
AU - Anand, Ashish
AU - Pollard, Steven M
AU - Bøe, Stig O
AU - Rinholm, Johanne E
AU - Frauenknecht, Katrin B M
AU - Golebiewska, Anna
AU - Niclou, Simone P
AU - Somyajit, Kumar
AU - Lerdrup, Mads
AU - Pandey, Deo P
TI - CDK12/
T2 - EMBO molecular medicine
J2 - EMBO Mol Med
PY - 2026
DA - 2026/
VL - 18
IS - 5
SP - 1592
EP - 1624
SN - 1757-4676
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "CDK12/
"container-title": "EMBO molecular medicine",
"author": [
{
"family": "Lier",
"given": "Silje"
},
{
"family": "Markusson",
"given": "Sara B"
},
{
"family": "Kocijancic",
"given": "Anja"
},
{
"family": "Narum",
"given": "Martine"
},
{
"family": "Lund",
"given": "Solveig O"
},
{
"family": "Böllering",
"given": "Bianka"
},
{
"family": "Lipsa",
"given": "Anuja"
},
{
"family": "Søegaard",
"given": "Mirra L C"
},
{
"family": "Rein",
"given": "Idun D"
},
{
"family": "Santha",
"given": "Petra"
},
{
"family": "Jain",
"given": "Preeti"
},
{
"family": "Lång",
"given": "Anna"
},
{
"family": "Lång",
"given": "Emma"
},
{
"family": "Meyer",
"given": "Niklas"
},
{
"family": "Dutta",
"given": "Aparajita"
},
{
"family": "Anand",
"given": "Santosh"
},
{
"family": "Badugu",
"given": "Sugith B"
},
{
"family": "Nesse",
"given": "Gaute J"
},
{
"family": "Forstrøm",
"given": "Rune J"
},
{
"family": "Klungland",
"given": "Arne"
},
{
"family": "Anand",
"given": "Ashish"
},
{
"family": "Pollard",
"given": "Steven M"
},
{
"family": "Bøe",
"given": "Stig O"
},
{
"family": "Rinholm",
"given": "Johanne E"
},
{
"family": "Frauenknecht",
"given": "Katrin B M"
},
{
"family": "Golebiewska",
"given": "Anna"
},
{
"family": "Niclou",
"given": "Simone P"
},
{
"family": "Somyajit",
"given": "Kumar"
},
{
"family": "Lerdrup",
"given": "Mads"
},
{
"family": "Pandey",
"given": "Deo P"
}
],
"container-title-short":
"volume": "18",
"issue": "5",
"page": "1592-1624",
"DOI": "10.1038/
"PMID": "41882177",
"PMCID": "PMC13179391",
"ISSN": "1757-4676",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
25
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41586-026-10612-6 [code]
- Acquired genetic and cell-state changes in IDH-mutant glioma progression.Journal: NatureIn common: pysam, BEDTools, SAMtools, 3 other tools, other condition, cellular / molecular, 1 reference, 2 authors
- [2] doi:10.1186/s13073-024-01321-8 [code]
- Glioblastoma-instructed microglia transition to heterogeneous phenotypic states with phagocytic and dendritic cell-like features in patient tumors and patient-derived orthotopic xenografts.Journal: Genome medicineIn common: ggplot2, other condition, mouse, 4 references, 2 authors
- [3] doi:10.1093/neuonc/noab269
- Cancer cell heterogeneity and plasticity: A paradigm shift in glioblastoma.Journal: Neuro-oncologyIn common: other condition, 7 references, author Anna Golebiewska
- [4] doi:10.1093/jnci/djaf295
- Targeting CDK12 disrupts estrogen-receptor chromatin recruitment and ER-MED1 transcription in advanced ER+ breast cancer.Journal: Journal of the National Cancer InstituteIn common: other condition, mouse, cellular / molecular, 7 references
- [5] doi:10.1038/s41586-026-10329-6 [code]
- Synthetic super-enhancers enable precision viral immunotherapy.Journal: NatureIn common: BEDTools, SAMtools, ggplot2, other condition, mouse, cellular / molecular, 2 references, author Steven M Pollard
- [6] doi:10.1038/s41586-026-10512-9 [code]
- Astrocyte glucocorticoid receptor signalling restricts neuronal plasticity.Journal: NatureIn common: pysam, Biopython, BEDTools, 4 other tools, mouse, cellular / molecular, 3 references
- [7] doi:10.1126/sciadv.adx6539
- Steroid-dependent metabolic rewiring reveals novel therapeutic and imaging approaches for glioblastoma.Journal: Science advancesIn common: other condition, mouse, 6 references, author Steven M Pollard
- [8] doi:10.1186/s12915-025-02127-9 [code]
- Mapping chromatin remodelling in glioblastoma identifies epigenetic regulation of key molecular pathways and novel druggable targets.Journal: BMC biologyIn common: pandas, NumPy, other condition, cellular / molecular, 9 references
- [9] doi:10.1016/j.celrep.2023.112561
- Elevated FOXG1 in glioblastoma stem cells cooperates with Wnt/
β-catenin to induce exit from quiescence. Journal: Cell reportsIn common: other condition, cellular / molecular, 4 references, author Steven M Pollard - [10] doi:10.1038/s41467-024-51432-4 [code]
- Deep intravital brain tumor imaging enabled by tailored three-photon microscopy and analysis.Journal: Nature communicationsIn common: NumPy, other condition, mouse, 4 references, author Anna Golebiewska
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 50 scripts, and 3 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:7d8202d7f92848b6…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1038/s44321-026-00393-w)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s44321-026-00393-w.svg
:target: https://openscicode.org/badge/doi/10.1038/s44321-026-00393-w
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s44321-026-00393-w"><img src="https://openscicode.org/badge/doi/10.1038/s44321-026-00393-w.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
