So I'm trying to parce a FastQ sequence, but I'm a beginner to Python, and I'm a little confused as to how to complete my code. This is what the program is supposed to carry out:
if I enter the FASTQ seqname line...
@EAS139:136:FC706VJ:2:2104:15343:197393
...then the program will output:
Instrument = EAS139
Run ID = 136
Flow Cell ID = FC706VJ
Flow Cell Lane = 2
Tile Number = 2104
X-coord = 15343
Y-coord = 197393
Here's my (incomplete) code:
class cleaner:
def __init__(self,str):
self.str = seq.upper()
def line (self):
1 = inStr.replace ('@',' ').replace (':',' ').split (' ')
newTuple =(float(1[1]),float(1[2))] #...etc
def printInstrument (self):
print ("Instrument: {0}".format(float(1[1])))
def printRunID (self):
print ("Run ID: {0}".format(float(1[2])))
def printFlowCellID (self):
print ("Flow Cell ID: {0}".format(float(1[3])))
def printFlowCellLane (self):
print ("Flow Cell Lane: {0}".format(float(1[4])))
def printTileNumber (self):
print ("Tile Number{0}".format(float(1[5])))
def printX (self):
print ("X-coordinate:{0}".format(float(1[6])))
def printY (self):
print ("y-coordinate: {0}".format(float(1[7])))
def main():
seq = input('Enter FastQ sequence:')
main()