You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There appears to be a problem when appending columns to a TabFile which contains data but which doesn't already have any column names assigned.
Example: create a new (empty) TabFile with no header and add a line of data - it reports the number of columns as zero and the header as an empty list:
>>> from bcftbx.TabFile import TabFile
>>> t = TabFile()
>>> t.append(data=[1,2,3])
1 2 3
>>> t.nColumns()
0
>>> t.header()
[]
Now append a new column - only the new column is reported:
>>> t.appendColumn('extra')
>>> t
1 2 3
>>> t.header()
['extra']
There appears to be a problem when appending columns to a
TabFile
which contains data but which doesn't already have any column names assigned.Example: create a new (empty)
TabFile
with no header and add a line of data - it reports the number of columns as zero and the header as an empty list:Now append a new column - only the new column is reported:
Output the data to
stdout
:Add data to the
extra
column and output tostdout
again - now the first column is overwritten:The text was updated successfully, but these errors were encountered: