igvteam / igv-reports

Python application to generate self-contained pages embedding IGV visualizations, with no dependency on original input files.
MIT License
347 stars 51 forks source link

fix bug in tsv header being retained as data row #89

Closed jethror1 closed 1 year ago

jethror1 commented 1 year ago

Appears to be a bug in handled tab files whereby the header is always treat as the first line of data, using a minimal test file produces the following:

chrom   start   end     field1  field2  field3
1       1252534 1252566 a       b       c
2       2337465 2337499 d       e       f

image

This looks to come from the fact the rows are parsed from the file, the first line is treat as the header but then not removed from the list of rows. With the changes this fixes it and produces a file with expected header: image

jrobinso commented 1 year ago

You are correct! Thanks for the PR