Hello,
I need to combine two fasta files having thousands of fasta sequences like:
File1:
>HWI-700823F:57:C97D4ANXX:8:1101:1295:2240 2:N:0:GTGAAACG
NAAGAGGGGAATCAGGAGGGACCGCAAATATGCAGTGCAGCCCCGTGCCGTGTATGCAAC
TGGGGTACACATGTCCCAGAACATAGCCGGGAAGTCAACG
>HWI-700823F:57:C97D4ANXX:8:1101:1587:2235 2:N:0:GTGAAACG
NTCTGCCGCTCTGCGTACAAGCTTGAGAGTTTTTTTGCAGACCTTCTTGCCGGCGAGAGG
CTTAGCTATGGGAGCCAAAGCCATCATCTTCTTCTTCTCT
>HWI-700823F:57:C97D4ANXX:8:1101:1974:2229 2:N:0:NTGAAANN
NCTAAGCATGCTTTGAACTTGATCTTCTCCTTCACGAATGGGAGCGATTGGGATGGTCCT
TACAGATTGCAGTTTCAAGTTCCCAAGGCTTGGCGAAACA
File2:
>HWI-700823F:57:C97D4ANXX:8:1101:1295:2240 1:N:0:GTGAAACG
GTCCCGTGATAATGGAAGTATTTGATTCTCTGCTCCGTCTTGTGCGTTGACTTCCCGGCT
ATGTTCTGGGACATGTGTACCCCAGTTGCATACACGGCAC
>HWI-700823F:57:C97D4ANXX:8:1101:1587:2235 1:N:0:GTGAAACG
CAGAAAGAGAAGAAGAAGATGATGGCTTTGGCTCCCATAGCTAAGCCTCTCGCCGGCAAG
AAGGTCTGCAAAAAAACTCTCAAGCTTGTACGCAGAGCGG
>HWI-700823F:57:C97D4ANXX:8:1101:1974:2229 1:N:0:NTGAAANN
CAACGATCGCCCCCTTCTGCAGACAAGTTACCAACCATGGCACAACTTGTGTCAACAATT
TGTGTGTCCGGAAAGATTGCTCTGTCACACGCGCCTTCT
I want to combine both files line by line and expected outcome is:
>HWI-700823F:57:C97D4ANXX:8:1101:1295:2240 2:N:0:GTGAAACG
NAAGAGGGGAATCAGGAGGGACCGCAAATATGCAGTGCAGCCCCGTGCCGTGTATGCAAC
TGGGGTACACATGTCCCAGAACATAGCCGGGAAGTCAACG
>HWI-700823F:57:C97D4ANXX:8:1101:1295:2240 1:N:0:GTGAAACG
GTCCCGTGATAATGGAAGTATTTGATTCTCTGCTCCGTCTTGTGCGTTGACTTCCCGGCT
ATGTTCTGGGACATGTGTACCCCAGTTGCATACACGGCAC
>HWI-700823F:57:C97D4ANXX:8:1101:1587:2235 2:N:0:GTGAAACG
NTCTGCCGCTCTGCGTACAAGCTTGAGAGTTTTTTTGCAGACCTTCTTGCCGGCGAGAGG
>HWI-700823F:57:C97D4ANXX:8:1101:1587:2235 1:N:0:GTGAAACG
CAGAAAGAGAAGAAGAAGATGATGGCTTTGGCTCCCATAGCTAAGCCTCTCGCCGGCAAG
AAGGTCTGCAAAAAAACTCTCAAGCTTGTACGCAGAGCGG
means, I want to combine both files like one sequence of 1st file then 1st sequence of 2nd file and so on.
I tried various commands but I am not able to parse this multiple fasta file, it takes 1st line as one sequence and not give desired output.
Please help me.
Hi Pierre,
Should I firstly linerize my sequences and then use the paste and transform command? or this one line command is enough for getting desired output?
Thank you.
Please use
ADD REPLY/ADD COMMENT
to respond to existing posts.Save following code in a file called
linearize.awk
and then run the command as shown by @Pierre.