コード例 #1
0
ファイル: SPIREmatch.py プロジェクト: kabelak/Project
                        _gene['Product'] = feature.qualifiers["product"]
                    _genes[str(genename)] = _gene
                    _gene = {}

    return _genes

# ## Initialise TSS data into an array
growthfile = "F:\Google Drive\Birkbeck\Project\RNAseq\Cortes sup mat\mmc2expogrowth.xlsx"
arrestfile = "F:\Google Drive\Birkbeck\Project\RNAseq\Cortes sup mat\mmc6arrest.xlsx"
datagrow = exceldata(growthfile, 5)
dataarrest = exceldata(arrestfile, 4)
fgrow, rgrow = extractTSS(datagrow)
farrest, rarrest = extractTSS(dataarrest)

### Initialise SPIRE and GenBank data into dictionaries
spire_entries = spireextract("mtb.txt")
codingregions = GENBANKparse("M.tb H37Rv BCT 2013-Jun-13.gb")

### Initialise dictionaries and variables for use below
possiblestartsgrow = defaultdict(list)
possiblestartsarrest = defaultdict(list)
downpossiblestartsgrow = defaultdict(list)
downpossiblestartsarrest = defaultdict(list)
spread = 200
ilength = 5
for key, value in spire_entries.items():
    ### Extract information from a SPIRE match
    matchat = re.search('\((\d*):(\d*)', key)
    matchstart = int(matchat.group(1))
    matchend = int(matchat.group(2))
    matchloc = re.search('(\w*)\sof.*', value['Feature']).group(1)
コード例 #2
0
ファイル: SPIREmatchTSS.py プロジェクト: kabelak/Project
                    _genes[str(genename)] = _gene
                    _gene = {}

    return _genes

### Initialise TSS data into an array
growthfile = "F:\Google Drive\Birkbeck\Project\RNAseq\Cortes sup mat\mmc2expogrowth.xlsx"
arrestfile = "F:\Google Drive\Birkbeck\Project\RNAseq\Cortes sup mat\mmc6arrest.xlsx"
datagrow = exceldata(growthfile, 5)
dataarrest = exceldata(arrestfile, 4)
fgrow, rgrow = extractTSS(datagrow)
farrest, rarrest = extractTSS(dataarrest)

### Initialise SPIRE and GenBank data into dictionaries
# TODO: Analyse which SPIRE output and which GenBank file to use!!!!!
spire_entries = spireextract("M.tb H37Rv CON 2014-Jul-11_modified SPIRE minusHypo.txt")
codingregions = GENBANKparse("M.tb H37Rv CON 2014-Jul-11_modified.gb")

### Initialise dictionaries and variables for use below
possiblestartsgrow = defaultdict(list)
possiblestartsarrest = defaultdict(list)
downpossiblestartsgrow = defaultdict(list)
downpossiblestartsarrest = defaultdict(list)
spread = 200
ilength = 5
for key, value in spire_entries.items():
    ### Extract information from a SPIRE match
    matchat = re.search('\((\d*):(\d*)', key)
    matchstart = int(matchat.group(1))
    matchend = int(matchat.group(2))
    matchloc = re.search('(\w*)\sof.*', value['Feature']).group(1)