Entering edit mode
2.1 years ago
YOUSEUFS
▴
30
I have a list of unique identifiers
identifiers = ['subject_1', 'subject_2']
and a multi-fasta file containing
>CDS::subject_1::123
AAATTT
>CDS::subject_1::354
CCCGGG
>CDS::subject_2::789
GGGCCC
>CDS::subject_2::765
TTTAAA
how would I extract every line that's associated to each unique identifier and concatenate them together to form an output file that looks like
>subject_1
AAATTTCCCGGG
>subject_2
GGGCCCTTTAAA
I'm having trouble getting this to work. Perhaps I should have stated more clearly, the fast-file looks more like
Which I'm trying to turn into
change the
sed
expression...