Ejemplo n.º 1
0
import os, sys
import json
from src.galaxyAnalysis import GalaxyAnalysis
from src.steps.rsemStep import RsemStep

###############
testOnly = False
###############

if sys.argv[1] == '--version':
    settingsFile = os.path.split(os.path.abspath(
        sys.argv[0]))[0] + '/' + "settingsE3.txt"
    if os.path.isfile(
            settingsFile):  # Unfortunately can't get xml arg for settings
        ana = GalaxyAnalysis(settingsFile, 'versions', 'hg19')
        ana.readType = 'paired'
        RsemStep(ana).writeVersions(allLevels=True)  # Prints to stdout
    else:
        print "Can't locate " + settingsFile
    exit(0)

# Command line args:
galaxyBamInput = sys.argv[1]
galaxyEvalFile = sys.argv[2]  # Look up tagLength and encoding
galaxyOutGenes = sys.argv[3]
galaxyOutTrans = sys.argv[4]
genome = sys.argv[5]
expType = sys.argv[6]
repNo = sys.argv[7]
anaId = sys.argv[8]
Ejemplo n.º 2
0
    except:
        pass 
    # TODO Is this really an error?
    if isPaired != isPaired2:
        raise Exception("Evaluation files suggest that alignment and control files do not match.")


# TODO: suffix needs to know whether this is being run on a sample!
suffix = expType + "Rep" + repNo

# 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
if isPaired:
    ana.readType = 'paired'
else:
    ana.readType = 'single'

# What step expects:
# Inputs: 1 bam, pre-registered in analysis           keyed as: 'alignment' + suffix + '.bam'
#         1 bam control (optional), pre-registered    keyed as: 'control' + suffix + '.bam'
# Outputs: target narrowPeak peaks file,      keyed as: 'peaks'     + suffix + '.bigBed'
#          target density bigWig file,        keyed as: 'density'   + suffix + '.bigWig'
    
# set up keys that join inputs through various file forwardings:
bamInputKey     = 'alignment' + suffix + '.bam'
controlInputKey = 'control'   + suffix + '.bam'
peakKey         = 'peaks'     + suffix + '.bigBed'
densityKey      = 'density'   + suffix + '.bigWig'
Ejemplo n.º 3
0
#                               <libId> <gender> <genome> <expType> <repNo> <analysisId>

import os, sys
import json
from src.galaxyAnalysis import GalaxyAnalysis
from src.steps.starAlignmentStep import StarAlignmentStep

###############
testOnly = False
###############

if  sys.argv[1] == '--version':
    settingsFile = os.path.split( os.path.abspath( sys.argv[0] ) )[0] + '/' + "settingsE3.txt"
    if os.path.isfile( settingsFile ):  # Unfortunately can't get xml arg for settings
        ana = GalaxyAnalysis(settingsFile, 'versions', 'hg19')
        ana.readType = 'paired'
        StarAlignmentStep(ana).writeVersions(allLevels=True) # Prints to stdout
    else:
        print "Can't locate " + settingsFile
    exit(0)

# Command line args:
pairedOrUnpaired     = sys.argv[1]
galaxyInputFile      = sys.argv[2]
galaxyEvalFile       = sys.argv[3]    # Look up tagLength and encoding
galaxyGenoBamOutput  = sys.argv[4]
galaxyAnnoBamOutput  = sys.argv[5]
galaxyBwAllOut       = sys.argv[6]
galaxyBwUniqOut      = sys.argv[7]
galaxyStatsOut       = sys.argv[8]
libId                = sys.argv[9]
Ejemplo n.º 4
0
        pass
    # TODO Is this really an error?
    if isPaired != isPaired2:
        raise Exception(
            "Evaluation files suggest that alignment and control files do not match."
        )

# TODO: suffix needs to know whether this is being run on a sample!
suffix = expType + "Rep" + repNo

# 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
if isPaired:
    ana.readType = 'paired'
else:
    ana.readType = 'single'

# What step expects:
# Inputs: 1 bam, pre-registered in analysis           keyed as: 'alignment' + suffix + '.bam'
#         1 bam control (optional), pre-registered    keyed as: 'control' + suffix + '.bam'
# Outputs: target narrowPeak peaks file,      keyed as: 'peaks'     + suffix + '.bigBed'
#          target density bigWig file,        keyed as: 'density'   + suffix + '.bigWig'

# set up keys that join inputs through various file forwardings:
bamInputKey = 'alignment' + suffix + '.bam'
controlInputKey = 'control' + suffix + '.bam'
peakKey = 'peaks' + suffix + '.bigBed'
densityKey = 'density' + suffix + '.bigWig'