Thanks so much, this was very helpful. I have a very similar goal, with one difference: I'd like to print the header of file 1 (in your example) rather than that of file 2. I've been trying to work out what sed command allows me to do that, but haven't managed yet. Would you have any idea?
So for clarification, this is what I would like:
**file1.fastq**
@HEADER1a
CTCAGNTTGG
+
AAAAA#EEEE
@HEADER1b
GTGAGTTTAG
+
AA<AA#EE<E
**file2.fastq**
@HEADER2a
CTTTA
+
#EEEA
@HEADER2b
GTGAG
+
A#E<E
**result.fastq = append file2.fastq to file1.fastq**
@HEADER1a
CTTTACTCAGNTTGG
+
#EEEAAAAAA#EEEE
@HEADER1b
GTGAGGTGAGTTTAG
+
A#E<EAA<AA#EE<E
• 0 views
•
link
Why do you need to do this?
To do:
Thank you for your answer, but that is not what I'm looking for. I think the question is clearly formulated: I need to prefix the reads of the first file with the reads of the second file.
Ah, I see, sorry.
But then, my question is even more pertinent: why do you need to do this?
For a quick and dirty concatenation:
I want to concatenate only the read sequences and quality sequences not all the components of a record. I need to do that to adapt my file as an input for in-house script for UMI deduplication.
Then you should script yourself a solution with awk, perl or python, it shouldn't be too difficult.