Skip to content

Commit

Permalink
add notes to master metadata to trace samples through pipeline #19 #18
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcolq committed Jun 16, 2021
1 parent f772aba commit 274accb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
7 changes: 4 additions & 3 deletions modules/extract_protected_sequences.nf
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ process annotate_metadata {
writer.writeheader()
for row in reader:
note = []
if row["sequence_name"] not in seqs:
note.append("sample not recent")
if row["note"]:
note.append(row["note"])
note.extend(row["note"].split("|"))
statement = "sample not recent"
if row["sequence_name"] not in seqs and statement not in note:
note.append("sample not recent")
row["note"] = "|".join(note)
writer.writerow(row)
"""
Expand Down
7 changes: 4 additions & 3 deletions modules/preprocess.nf
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,11 @@ process annotate_metadata {
writer.writeheader()
for row in reader:
note = []
if row["sequence_name"] in tips:
note.append("tip in input tree")
if row["note"]:
note.append(row["note"])
note.extend(row["note"].split("|"))
statement = "tip in input tree"
if row["sequence_name"] and statement not in note:
note.append(statement)
row["note"] = "|".join(note)
writer.writerow(row)
"""
Expand Down
5 changes: 4 additions & 1 deletion workflows/process_usher_pangolin.nf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ workflow {
ch_protobuf = build_protobuf.out.protobuf
}

ch_protected = extract_protected_sequences(ch_clean_fasta, ch_clean_metadata)
extract_protected_sequences(ch_clean_fasta, ch_clean_metadata)
ch_protected = extract_protected_sequences.out.fasta
ch_protected_metadata = extract_protected_sequences.out.metadata

update_protobuf(ch_protected, ch_protobuf, ch_clean_metadata)
train_usher_pangolin(update_protobuf.out.protobuf)
}

0 comments on commit 274accb

Please sign in to comment.