Closed yk-tanigawa closed 7 years ago
path = fastq_paths[self.version]['template'] % (self.group)
'template'
fastq_paths
is a global variable in this program (lines 17-31), which handles the difference of data structure.fastq_paths = {
'closed' : {},
'r9rnn' : { 'template' : '/Analyses/Basecall_RNN_1D_%03d/BaseCalled_template'},
'metrichor1.16' : { 'template' : '/Analyses/Basecall_1D_%03d/BaseCalled_template',
'complement' : '/Analyses/Basecall_1D_%03d/BaseCalled_complement',
'twodirections' : '/Analyses/Basecall_2D_%03d/BaseCalled_2D',
'pre_basecalled' : '/Analyses/EventDetection_000/Reads/'
},
'classic' : { 'template' : '/Analyses/Basecall_2D_%03d/BaseCalled_template',
'complement' : '/Analyses/Basecall_2D_%03d/BaseCalled_complement',
'twodirections' : '/Analyses/Basecall_2D_%03d/BaseCalled_2D',
'pre_basecalled' : '/Analyses/EventDetection_000/Reads/'
},
'prebasecalled' : {'pre_basecalled' : '/Analyses/EventDetection_000/Reads/'}
}
self.version
is one of the followings and that is determined by self.guess_version()
(line 218-)
r9nn
. classic
, metrichor1.16
, prebasecalled
def guess_version(self):
"""
Try and guess the location of template/complement blocks
"""
try:
self.hdf5file["/Analyses/Basecall_RNN_1D_%03d/BaseCalled_template" % (self.group)]
return 'r9rnn'
except KeyError:
pass
try:
self.hdf5file["/Analyses/Basecall_2D_%03d/BaseCalled_template" % (self.group)]
return 'classic'
except KeyError:
pass
try:
self.hdf5file["/Analyses/Basecall_1D_%03d/BaseCalled_template" % (self.group)]
return 'metrichor1.16'
except KeyError:
pass
return 'prebasecalled'
'template'
is missing because self.version
should be classic
based on what we see in https://github.com/rivas-lab/nanopore/issues/8