Major update: New column type to store sequence qualities. Closes #41
This commit is contained in:
@ -35,7 +35,6 @@ def addOptions(parser):
|
||||
type=str,
|
||||
help="Name of the default DMS for reading and writing data")
|
||||
|
||||
|
||||
group.add_argument('--destination-view','-v',
|
||||
action="store", dest="import:destview",
|
||||
metavar='<VIEW NAME>',
|
||||
@ -96,12 +95,14 @@ def run(config):
|
||||
|
||||
inputs = uopen(config['import']['filename'])
|
||||
|
||||
get_quality = False
|
||||
if config['import']['seqinformat']=='fasta':
|
||||
iseq = fastaIterator(inputs)
|
||||
view_type="NUC_SEQS_VIEW"
|
||||
elif config['import']['seqinformat']=='fastq':
|
||||
iseq = fastqIterator(inputs)
|
||||
view_type="NUC_SEQS_VIEW"
|
||||
get_quality = True
|
||||
else:
|
||||
raise RuntimeError('No file format specified')
|
||||
|
||||
@ -120,13 +121,15 @@ def run(config):
|
||||
view[i].set_id(seq['id'])
|
||||
view[i].set_definition(seq['definition'])
|
||||
view[i].set_sequence(seq['sequence'])
|
||||
if get_quality :
|
||||
view[i].set_quality(seq['quality'])
|
||||
for tag in seq['tags'] :
|
||||
#print(tag, seq['tags'][tag])
|
||||
#if seq['tags'][tag] not in NA_list :
|
||||
view[i][tag] = seq['tags'][tag]
|
||||
i+=1
|
||||
|
||||
#print(view)
|
||||
#print(i)
|
||||
print(view.__repr__())
|
||||
|
||||
view.save_and_close()
|
||||
|
Reference in New Issue
Block a user