Skip to content

Commit

Permalink
add header
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-parker committed Jan 16, 2025
1 parent ecf815d commit 5740b67
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ingest/scripts/call_loculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def submit(metadata_output, sequences_output, number_of_submissions):
submission_id_chunk = []
fasta_submission_id = None
fasta_header = None
table_header = None

sequences_output = ""
metadata_output = ""
Expand All @@ -214,12 +215,17 @@ def submit(metadata_output, sequences_output, number_of_submissions):
):
for record in metadata_file_stream:
number_of_submissions += 1
metadata_output += record
if number_of_submissions == 0:
# get column index of submissionId
print(record.split("\t"))
header_index = record.strip().split("\t").index("submissionId")
table_header = record
metadata_output += table_header
continue
if number_of_submissions > 1 and number_of_submissions % chunk_size == 1:
metadata_output += table_header

metadata_output += record

metadata_submission_id = record.split("\t")[header_index].strip()

Expand Down

0 comments on commit 5740b67

Please sign in to comment.