CONTEXT
When invoked without optional arguments, only the necessary "--input" bb_get_fasta info displays all data in tabular format, like this:
Seq_id header sequence
If the script is invoked without any argument it displays the Help, as is the default behavior in any other BB script.
PROBLEM
When data comes from a pipe like this:
cat sequence.fasta | bb_get_fasta_info
Instead of showing the sequence information in tabular format, bb_get_fasta_info shows the help. Maybe because the underlyinf function that it uses (BBSeq::get_fasta_components) fails in identifying that the "-i" is not necessary if data comes already from a pipe.
The problem is solved if any optional flag is used, like this:
cat sequence.fasta | bb_get_fasta_info -h (will show the header)
cat sequence.fasta | bb_get_fasta_info -dsh (will show all the info in tabular format)
SOLUTION
Probably the best way to solve this is inside the BBSeq::get_fasta_components function itself. I think between lines 137 and 145 is the key?
CONTEXT When invoked without optional arguments, only the necessary "--input" bb_get_fasta info displays all data in tabular format, like this: Seq_id header sequence
If the script is invoked without any argument it displays the Help, as is the default behavior in any other BB script.
PROBLEM When data comes from a pipe like this:
cat sequence.fasta | bb_get_fasta_info
Instead of showing the sequence information in tabular format, bb_get_fasta_info shows the help. Maybe because the underlyinf function that it uses (BBSeq::get_fasta_components) fails in identifying that the "-i" is not necessary if data comes already from a pipe. The problem is solved if any optional flag is used, like this:
cat sequence.fasta | bb_get_fasta_info -h (will show the header) cat sequence.fasta | bb_get_fasta_info -dsh (will show all the info in tabular format)
SOLUTION Probably the best way to solve this is inside the BBSeq::get_fasta_components function itself. I think between lines 137 and 145 is the key?