def __init__(self, analysis, suffix="", readFilter='all', strand='Plus'):
     self.suffix = str(suffix)
     self.readFilter = readFilter
     self.strand = strand
     LogicalStep.__init__(self, analysis, 'bamToBws_' + \
                                                 readFilter.lower() + strand + '_' + suffix)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all set versions
 def writeVersions(self,raFile=None,allLevels=False):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         raFile.add('eap_run_hotspot', self.getToolVersion('eap_run_hotspot'))
         raFile.add('hotspot',     self.getToolVersion( \
                                   self.ana.toolsDir+'hotspot-distr/hotspot-deploy/bin/hotspot'))
         raFile.add('python2.7',   self.getToolVersion('python2.7'))
         raFile.add('hotspot.py',  self.getToolVersion('hotspot.py'))
         raFile.add('bedToBigBed', self.getToolVersion('bedToBigBed'))
         raFile.add('bedmap',      self.getToolVersion('bedmap'))
         raFile.add('sort-bed',    self.getToolVersion('sort-bed'))
         raFile.add('starchcat',   self.getToolVersion('starchcat'))
         raFile.add('unstarch',    self.getToolVersion('unstarch'))
         raFile.add('intersectBed',self.getToolVersion( \
                                                 self.ana.toolsDir+'bedtools/bin/intersectBed'))
         raFile.add('bedGraphPack',self.getToolVersion('bedGraphPack'))
         raFile.add('bedGraphToBigWig', self.getToolVersion('bedGraphToBigWig'))
     else:
         self.getToolVersion('eap_run_hotspot')
         self.getToolVersion(self.ana.toolsDir+'hotspot-distr/hotspot-deploy/bin/hotspot')
         self.getToolVersion('python2.7')
         self.getToolVersion('hotspot.py')
         self.getToolVersion('bedToBigBed')
         self.getToolVersion('bedmap')
         self.getToolVersion('sort-bed')
         self.getToolVersion('starchcat')
         self.getToolVersion('unstarch')
         self.getToolVersion(self.ana.toolsDir+'bedtools/bin/intersectBed')
         self.getToolVersion('bedGraphPack')
         self.getToolVersion('bedGraphToBigWig')
 def __init__(self, analysis, suffix="", readFilter='all', strand='Plus'):
     self.suffix = str(suffix)
     self.readFilter = readFilter
     self.strand     = strand
     LogicalStep.__init__(self, analysis, 'bamToBws_' + \
                                                 readFilter.lower() + strand + '_' + suffix)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all set versions
Exemple #4
0
 def __init__(self, analysis, replicate='1', libId='', encoding='sanger', tagLen=100):
     self.replicate = str(replicate)
     self.encoding  = encoding
     self.libId     = libId
     self.tagLen    = int(tagLen)
     LogicalStep.__init__(self, analysis, 'alignmentByTophat_' + analysis.readType + 'Rep' + \
                                                                                self.replicate)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all step versions
Exemple #5
0
 def writeVersions(self, raFile=None, allLevels=False):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         raFile.add('samtools', samtools.version(self))
     else:
         samtools.version(self)
 def writeVersions(self, raFile=None, allLevels=False):
     """Writes versions to to the log or a file."""
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         raFile.add("samtools", samtools.version(self))
     else:
         samtools.version(self)
 def writeVersions(self,raFile=None,allLevels=False):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         raFile.add('ucscUtils', ucscUtils.version(self,tool='fastqStatsAndSubsample'))
         raFile.add('fastqc', self.getToolVersion('fastqc'))
     else:
         ucscUtils.version(self,tool='fastqStatsAndSubsample')
         self.getToolVersion('fastqc')
Exemple #8
0
 def writeVersions(self, raFile=None, allLevels=False):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         raFile.add('ucscUtils',
                    ucscUtils.version(self, tool='fastqStatsAndSubsample'))
         raFile.add('fastqc', self.getToolVersion('fastqc'))
     else:
         ucscUtils.version(self, tool='fastqStatsAndSubsample')
         self.getToolVersion('fastqc')
 def writeVersions(self,raFile=None,allLevels=False,scriptName=None):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         if scriptName != None:
             raFile.add(scriptName, self.getToolVersion(scriptName))
         raFile.add('bwa', self.getToolVersion('bwa'))
         raFile.add('samtools', self.getToolVersion('samtools'))
     else:
         if scriptName != None:
             self.getToolVersion(scriptName)
         self.getToolVersion('bwa')
         self.getToolVersion('samtools')
Exemple #10
0
 def writeVersions(self,raFile=None,allLevels=False,scriptName=None):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         if scriptName != None:
             raFile.add(scriptName, self.getToolVersion(scriptName))
         raFile.add('edwBamStats', self.getToolVersion('edwBamStats'))
         raFile.add('samtools', self.getToolVersion('samtools'))
         raFile.add('Rscript', self.getToolVersion('Rscript'))
         raFile.add('run_spp.R', self.getToolVersion(self.ana.toolsDir+'run_spp.R'))
     else:
         if scriptName != None:
             self.getToolVersion(scriptName)
         self.getToolVersion('edwBamStats')
         self.getToolVersion('samtools')
         self.getToolVersion('Rscript')
         self.getToolVersion(self.ana.toolsDir+'run_spp.R')
Exemple #11
0
 def writeVersions(self,raFile=None,allLevels=False,scriptName=None):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         if scriptName  != None:
             raFile.add(scriptName, self.getToolVersion(scriptName))
         raFile.add('tophat', self.getToolVersion('tophat'))
         raFile.add('bowtie2', self.getToolVersion('bowtie2'))
         raFile.add('samtools', self.getToolVersion('samtools'))
         raFile.add('tophat_bam_xsA_tag_fix.pl', self.getToolVersion('tophat_bam_xsA_tag_fix.pl'))
     else:
         if scriptName != None:
             self.getToolVersion(scriptName)
         self.getToolVersion('tophat')
         self.getToolVersion('bowtie2')
         self.getToolVersion('samtools')
         self.getToolVersion('tophat_bam_xsA_tag_fix.pl')
 def writeVersions(self,raFile=None,allLevels=False,scriptName=None):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         if scriptName != None:
             raFile.add(scriptName, self.getToolVersion(scriptName))
         raFile.add('macs',                     self.getToolVersion('macs2'))
         raFile.add('eap_macs2_xls_to_narrowPeak', 
                                             self.getToolVersion('eap_macs2_xls_to_narrowPeak'))
         raFile.add('eap_narrowPeak_to_bigBed', self.getToolVersion('eap_narrowPeak_to_bigBed'))
         raFile.add('bedGraphToBigWig',         self.getToolVersion('bedGraphToBigWig'))
     else:
         if scriptName != None:
             self.getToolVersion(scriptName)
         self.getToolVersion('macs2')
         self.getToolVersion('eap_macs2_xls_to_narrowPeak')
         self.getToolVersion('eap_narrowPeak_to_bigBed')
         self.getToolVersion('bedGraphToBigWig')
 def writeVersions(self,raFile=None,allLevels=False,scriptName=None):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         if scriptName != None:
             raFile.add(scriptName,self.getToolVersion(scriptName))
         raFile.add('samtools',    self.getToolVersion('samtools'))
         raFile.add('makewigglefromBAM-NH.py', \
                                   self.getToolVersion('makewigglefromBAM-NH.py'))
         raFile.add('python2.7',   self.getToolVersion('python2.7'))
         raFile.add('wigToBigWig', self.getToolVersion('wigToBigWig'))
         #raFile.add('perl', self.getToolVersion('perl'))
     else:
         if scriptName != None:
             self.getToolVersion(scriptName)
         self.getToolVersion('samtools')
         self.getToolVersion('makewigglefromBAM-NH.py')
         self.getToolVersion('python2.7')
         self.getToolVersion('wigToBigWig')
Exemple #14
0
 def writeVersions(self, raFile=None, allLevels=False, scriptName=None):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         if scriptName != None:
             raFile.add(scriptName, self.getToolVersion(scriptName))
         raFile.add('samtools', self.getToolVersion('samtools'))
         raFile.add('makewigglefromBAM-NH.py', \
                                   self.getToolVersion('makewigglefromBAM-NH.py'))
         raFile.add('python2.7', self.getToolVersion('python2.7'))
         raFile.add('wigToBigWig', self.getToolVersion('wigToBigWig'))
         #raFile.add('perl', self.getToolVersion('perl'))
     else:
         if scriptName != None:
             self.getToolVersion(scriptName)
         self.getToolVersion('samtools')
         self.getToolVersion('makewigglefromBAM-NH.py')
         self.getToolVersion('python2.7')
         self.getToolVersion('wigToBigWig')
Exemple #15
0
 def writeVersions(self, raFile=None, allLevels=False, scriptName=None):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         if scriptName != None:
             raFile.add(scriptName, self.getToolVersion(scriptName))
         raFile.add('macs', self.getToolVersion('macs2'))
         raFile.add('eap_macs2_xls_to_narrowPeak',
                    self.getToolVersion('eap_macs2_xls_to_narrowPeak'))
         raFile.add('eap_narrowPeak_to_bigBed',
                    self.getToolVersion('eap_narrowPeak_to_bigBed'))
         raFile.add('bedGraphToBigWig',
                    self.getToolVersion('bedGraphToBigWig'))
     else:
         if scriptName != None:
             self.getToolVersion(scriptName)
         self.getToolVersion('macs2')
         self.getToolVersion('eap_macs2_xls_to_narrowPeak')
         self.getToolVersion('eap_narrowPeak_to_bigBed')
         self.getToolVersion('bedGraphToBigWig')
Exemple #16
0
 def writeVersions(self, raFile=None, allLevels=False):
     '''Writes versions to to the log or a file.'''
     if allLevels:
         LogicalStep.writeVersions(self, raFile)
     if raFile != None:
         raFile.add('eap_run_hotspot',
                    self.getToolVersion('eap_run_hotspot'))
         raFile.add('hotspot',     self.getToolVersion( \
                                   self.ana.toolsDir+'hotspot-distr/hotspot-deploy/bin/hotspot'))
         raFile.add('python2.7', self.getToolVersion('python2.7'))
         raFile.add('hotspot.py', self.getToolVersion('hotspot.py'))
         raFile.add('bedToBigBed', self.getToolVersion('bedToBigBed'))
         raFile.add('bedmap', self.getToolVersion('bedmap'))
         raFile.add('sort-bed', self.getToolVersion('sort-bed'))
         raFile.add('starchcat', self.getToolVersion('starchcat'))
         raFile.add('unstarch', self.getToolVersion('unstarch'))
         raFile.add('intersectBed',self.getToolVersion( \
                                                 self.ana.toolsDir+'bedtools/bin/intersectBed'))
         raFile.add('bedGraphPack', self.getToolVersion('bedGraphPack'))
         raFile.add('bedGraphToBigWig',
                    self.getToolVersion('bedGraphToBigWig'))
     else:
         self.getToolVersion('eap_run_hotspot')
         self.getToolVersion(self.ana.toolsDir +
                             'hotspot-distr/hotspot-deploy/bin/hotspot')
         self.getToolVersion('python2.7')
         self.getToolVersion('hotspot.py')
         self.getToolVersion('bedToBigBed')
         self.getToolVersion('bedmap')
         self.getToolVersion('sort-bed')
         self.getToolVersion('starchcat')
         self.getToolVersion('unstarch')
         self.getToolVersion(self.ana.toolsDir +
                             'bedtools/bin/intersectBed')
         self.getToolVersion('bedGraphPack')
         self.getToolVersion('bedGraphToBigWig')
 def __init__(self, analysis, replicate1="1", replicate2="2"):
     self.replicate1 = str(replicate1)
     self.replicate2 = str(replicate2)
     LogicalStep.__init__(self, analysis, "mergeBam_Rep" + self.replicate1 + "Rep" + self.replicate2)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all set versions
Exemple #18
0
 def __init__(self, analysis, suffix=""):
     self.suffix    = str(suffix)
     LogicalStep.__init__(self, analysis, 'quantitateRsem_' + analysis.readType + '_' + suffix)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all step versions
    seed = e3.getSetting('fastqSampleSeed', '12345')

    # Establish up tool locations
    toolPath = e3.getSetting('toolPath')
    fastqcToolPath = e3.getSetting('fastqcToolPath', toolPath)

    # Get nonGalaxy paths
    e3.registerFile('fastq', 'galaxyInput', galaxyInputFile)
    e3.registerFile('validated', 'galaxyOutput', galaxyOutputFile)
    nonGalaxyInput = e3.nonGalaxyInput('fastq')
    resultsDir = e3.resultsDir(galaxyPath)
    runningLog = e3.declareLogFile()
    e3.log.empty()  # start with an empty log

    # Begin logging
    step = LogicalStep(e3, stepName)

    # Establish temporary and Permenant outputs
    sampleOf = step.declareGarbageFile('sampleOf_s' + reads, suffix='fastq')
    sampledStats = step.declareGarbageFile('sampledStats', suffix='txt')
    # The following 2 are bound together by the same nameKey:
    stepFile = step.declareTargetFile(
        'validateRep' + repNo, suffix='html')  # will become nonGalaxyOutput
    nonGalaxyOutput = e3.createOutFile('validateRep'+repNo,'nonGalaxyOutput', \
                                   '%s_s'+reads+'_fastqc/fastqc_report', ext='html' )

    # FAKING step.run()
    step._status = 'Running'
    step.declareLogFile()  # Ensures that the logical step dir and log exist
    step.log.out("--- Beginning '" + stepName + "' [" +
                 datetime.now().strftime("%Y-%m-%d %X (%A)") + '] ---')
 def __init__(self, analysis, suffix='', tagLen=50):
     self.suffix = str(suffix)
     self.tagLen    = int(tagLen)
     LogicalStep.__init__(self, analysis, 'peaksByHotspot_' + self.suffix)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all set versions
 def __init__(self, analysis, suffix='', expType='ChIPseq',isPaired=False):
     self.suffix = str(suffix)
     self.expType    = str(expType)
     self.isPaired   = isPaired
     LogicalStep.__init__(self, analysis, 'peaksByMacs_' + self.suffix)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all set versions
Exemple #22
0
 def __init__(self, analysis, suffix=''):
     self.suffix = str(suffix)
     LogicalStep.__init__(self, analysis, 'fastqValidation_' + self.suffix)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all set versions
Exemple #23
0
 def __init__(self, analysis, replicate1='1', replicate2='2'):
     self.replicate1 = str(replicate1)
     self.replicate2 = str(replicate2)
     LogicalStep.__init__(self, analysis, \
                          'mergeBam_Rep' + self.replicate1 + 'Rep' + self.replicate2)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all set versions
Exemple #24
0
 def __init__(self, analysis, suffix='', tagLen=50):
     self.suffix = str(suffix)
     self.tagLen = int(tagLen)
     LogicalStep.__init__(self, analysis, 'peaksByHotspot_' + self.suffix)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all set versions
    seed = e3.getSetting('fastqSampleSeed','12345')

    # Establish up tool locations
    toolPath = e3.getSetting('toolPath')
    fastqcToolPath = e3.getSetting('fastqcToolPath',toolPath)
    
    # Get nonGalaxy paths
    e3.registerFile('fastq','galaxyInput',galaxyInputFile)
    e3.registerFile('validated','galaxyOutput',galaxyOutputFile)
    nonGalaxyInput = e3.nonGalaxyInput('fastq')
    resultsDir     = e3.resultsDir(galaxyPath)
    runningLog     = e3.declareLogFile()
    e3.log.empty()  # start with an empty log
    
    # Begin logging
    step = LogicalStep(e3,stepName)
    
    # Establish temporary and Permenant outputs  
    sampleOf     = step.declareGarbageFile('sampleOf_s' + reads, suffix='fastq')
    sampledStats = step.declareGarbageFile('sampledStats', suffix='txt')
    # The following 2 are bound together by the same nameKey:
    stepFile      = step.declareTargetFile('validateRep'+repNo, suffix='html') # will become nonGalaxyOutput
    nonGalaxyOutput = e3.createOutFile('validateRep'+repNo,'nonGalaxyOutput', \
                                   '%s_s'+reads+'_fastqc/fastqc_report', ext='html' )

    # FAKING step.run()
    step._status = 'Running'
    step.declareLogFile() # Ensures that the logical step dir and log exist
    step.log.out("--- Beginning '" + stepName + "' [" + 
               datetime.now().strftime("%Y-%m-%d %X (%A)")+ '] ---')
Exemple #26
0
 def __init__(self, analysis, suffix='', expType='ChIPseq', isPaired=False):
     self.suffix = str(suffix)
     self.expType = str(expType)
     self.isPaired = isPaired
     LogicalStep.__init__(self, analysis, 'peaksByMacs_' + self.suffix)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all set versions
 def __init__(self, analysis, suffix=''):
     self.suffix = str(suffix)
     LogicalStep.__init__(self, analysis, 'fastqValidation_' + self.suffix)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all set versions
Exemple #28
0
 def __init__(self, analysis, replicate="1", suffix=""):
     self.replicate = str(replicate)
     self.suffix = suffix
     LogicalStep.__init__(self, analysis, 'bamEvaluate' + self.suffix)
 def __init__(self, analysis, replicate="1", encoding='sanger'):
     self.replicate = str(replicate)
     self.encoding  = encoding
     LogicalStep.__init__(self, analysis, 'alignmentByBwa_' + analysis.readType + 'Rep' + \
                                                                                self.replicate)
     self._stepVersion = self._stepVersion + 0  # Increment allows changing all step versions