Code: Alles auswählen
gene.100079.0.5.p3 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 84.9
gene.100079.0.3.p1 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 84.9
gene.100079.0.0.p1 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 86.7
gene.100080.0.3.p1 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 99.9
gene.100080.0.0.p1 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 99.9
chr11_pilon3.g3568.t1 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 74.9
chr11_pilon3.g3568.t2 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 76.7
Die IDs sind sehr aehnlich
Code: Alles auswählen
gene.100079.0.5.p3
gene.100079.0.3.p1
gene.100079.0.0.p1
- `chr11_pilon3.g3568.t1 = 74.9` && `chr11_pilon3.g3568.t2 = 76.7`. `chr11_pilon3.g3568.t2` hat den höchsten Wert und deshalb soll es ausgegeben werden.
- `gene.100079.0.0.p1 = 86.7` && `gene.100079.0.5.p3 = 84.9` == `gene.100079.0.3.p1 = 84.9`. `gene.100079.0.0.p1` hat den höchsten Wert und deshalb soll es ausgegeben werden.
- `gene.100080.0.3.p1 = 99.9` == `gene.100080.0.0.p1 = 99.9`. Beide IDs sind identish und deshalb soll sie ausgegeben werden.
Code: Alles auswählen
from collections import defaultdict
blastStorage = defaultdict(list)
with open("data/blastp-bigcov.tsv") as blast_fn:
for line in blast_fn:
lineParts = line.rstrip().split('\t')
print(lineParts)
if lineParts[0].startswith("gene"):
split_id = lineParts[0].split('.')
tmp_id = split_id[0] + "." + split_id[1]
else:
tmp_id = lineParts[0]
print(tmp_id)
blastStorage[tmp_id].append(lineParts)
for isoformID in blastStorage.keys():
print("results2: "), max(blastStorage[isoformID], key=lambda x: x[12])
Code: Alles auswählen
chr11_pilon3.g3568.t1 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 74.9
chr11_pilon3.g3568.t2 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 76.7
gene.100079.0.0.p1 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 86.7
gene.100080.0.3.p1 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 99.9
gene.100080.0.0.p1 transcript:OIS96097 82.2 169 30 0 1 169 4 172 1.3e-75 283.1 99.9