コード例 #1
0
ファイル: mergeBamsE3.py プロジェクト: sirusb/uniformAnalysis
galaxyInputBamB = sys.argv[3]
repB = sys.argv[4]
galaxyOutMergedBam = sys.argv[5]
genome = sys.argv[6]
expType = sys.argv[7]
anaId = sys.argv[8]

# No longer command line parameters:
scriptPath = os.path.split(os.path.abspath(sys.argv[0]))[0]
galaxyPath = '/'.join(scriptPath.split('/')[:-2])
settingsFile = scriptPath + '/' + "settingsE3.txt"

# Set up 'ana' so she can do all the work.  If anaId matches another, then it's log is extended
ana = GalaxyAnalysis(settingsFile, anaId, genome, expType)
if testOnly:
    ana.dryRun = testOnly

# What step expects:
# Inputs: 2 bam files, pre-registered in the analysis and both keyed as: 'bamRep' + replicateN + '.bam'
# Outputs: 1 merged bam keyed as: 'mergedRep' + replicate1 + 'Rep' +replcicate2 + '.bam'

# set up keys that join inputs through various file forwardings:
bamAkey = 'bamRep' + repA + '.bam'
bamBkey = 'bamRep' + repB + '.bam'
mergedBamKey = 'mergedRep' + repA + 'Rep' + repB + '.bam'

# Establish Inputs for galaxy and nonGalaxy alike
ana.registerFile(bamAkey, 'galaxyInput', galaxyInputBamA)
ana.registerFile(bamBkey, 'galaxyInput', galaxyInputBamB)
nonGalaxyInput1 = ana.nonGalaxyInput(
    bamAkey)  # Registers and returns the outside location
コード例 #2
0
galaxyInputFile     = sys.argv[1]
galaxyOutBamEval    = sys.argv[2]
genome              = sys.argv[3]
expType             = sys.argv[4]
repNo               = sys.argv[5]
anaId               = sys.argv[6]

# No longer command line parameters:
scriptPath = os.path.split( os.path.abspath( sys.argv[0] ) )[0]
galaxyPath = '/'.join(scriptPath.split('/')[ :-2 ])  
settingsFile = scriptPath + '/' + "settingsE3.txt"

# Set up 'ana' so she can do all the work.  If anaId matches another, then it's log is extended
ana = GalaxyAnalysis(settingsFile, anaId, genome, expType)
if testOnly:
    ana.dryRun = testOnly

# What step expects:
# Inputs: 1 bam, pre-registered in the analysis keyed as: 'alignmentRep' + replicate + '.bam'
# Outputs: 1 interim Corr       file, keyed as: 'strandCorr' + suffix +    '.txt'
#          1 target json        file, keyed as: 'bamEvaluate' + suffix +   '.json'

# TODO: Does a galaxy user really want the sample bam?
    
# set up keys that join inputs through various file forwardings:
bamInputKey   = 'alignmentRep'   + repNo +    '.bam'

# Establish Inputs for galaxy and nonGalaxy alike
ana.registerFile(bamInputKey,'galaxyInput', galaxyInputFile)
nonGalaxyInput  = ana.nonGalaxyInput(bamInputKey)  # Registers and returns the outside location
suffix = 'Rep' + repNo