Task: expandflag - sanger-pathogens/ariba GitHub Wiki

Task: expandflag

This takes a report file (made by ariba run), and expands the flag column from a number into a string showing the meaning of the flag. For example flag 27, which has this meaning:

[X] assembled
[X] assembled_into_one_contig
[ ] region_assembled_twice
[X] complete_gene
[X] unique_contig
[ ] scaffold_graph_bad
[ ] assembly_fail
[ ] variants_suggest_collapsed_repeat
[ ] hit_both_strands
[ ] has_variant
[ ] ref_seq_choose_fail

becomes assembled,assembled_into_one_contig,complete_gene,unique_contig instead of the number 27.

Run it like this:

ariba expandflag in.report.tsv out.report.tsv

The output file will be identical to the input file, except for the flag column.