ampinzonv / BB2

BioBash UN official repository
Other
3 stars 1 forks source link

BB::Seq::get_fasta_components -sd option defaults to -sdh #3

Open ampinzonv opened 1 year ago

ampinzonv commented 1 year ago

CONTEXT BB::Seq::get_fasta_components retrieves fasta header, ID and/or sequence from a fasta file. For this the user uses different flags:

0) non flag for retrieving everything 1) -d/--id for sequence ID 2) -h/--header for fasta header 3) -s/--sequence for the sequence

Or any combination of this three flags.

PROBLEM When using the flags: hs we should display only the fasta header without the ID + sequence BUT FOR NOW we are defaulting to show everything, because I have not found an easy way to get rid of the first word of the (sequence ID) of the header fasta. Meaning that -hs is equal to -hsd.

POSSIBLE SOLUTION It is necessary to identify the option "-hs" and treat it as a special case. Then get the header as a string and obtain only the whole text (first word) BEFORE the first "space" (or "tab"?) character in string. So it is necessary to tell awk or whatever to search for that pattern and extract it.