Skip to content

Commit

Permalink
Fix output of b37 in header (fixes #1121)
Browse files Browse the repository at this point in the history
There should be a better way to do this, but for now the solution
has been to regenerate the header for the file within each python
module that is returning GFF data.
  • Loading branch information
Madeleine Price Ball committed Aug 22, 2012
1 parent d8aef40 commit f680f76
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/call_missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,14 @@ def report_uncovered(gff_input, transcript_filename, genetests_filename,
# Note: Start is 1-based, not 0-based as is in transcript files
examined_regions = {}

header_done = False
for record in gff_data:
if not header_done:
yield "##gff-version " + gff_data.data[0]
yield "##genome-build " + gff_data.data[1]
yield "# Produced by: call_missing.py"
header_done = True

if f_out:
yield str(record)

Expand Down
9 changes: 9 additions & 0 deletions server/get_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,16 @@ def genome_metadata(gff_input, genome_stats_file, progresstracker):
progresstracker.metadata['chromosomes'] = list()

# Progress through GFF input.
header_done = False
for record in gff_data:
# Have to do this after calling the first record to
# get the iterator to read through the header data
if not header_done:
yield "##gff-version " + gff_data.data[0]
yield "##genome-build " + gff_data.data[1]
yield "# Produced by: get_metadata.py"
header_done = True

# Record number of positions called.
dist = (record.end - (record.start - 1))
called_num += dist
Expand Down

0 comments on commit f680f76

Please sign in to comment.