This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to write all pair end file name in a tab delimited format

I do have pair-end file name like this, could you please share a command that can write all the file name in a tab-delimited format like shown below:

Leaf_T1_F_R10_S1_unmapped.R1.fq Leaf_T1_F_R10_S1_unmapped.R2.fq 
Leaf_T1_F_R2_S5_unmapped.R1.fq  Leaf_T1_F_R2_S5_unmapped.R2.fq 
Leaf_T1_F_R3_S4_unmapped.R1.fq  Leaf_T1_F_R3_S4_unmapped.R2.fq

Many thanks

linux unix bash

1 answer

ls *_unmapped.R1.fq | awk -F ".R1.fq" '{print $1".R1.fq", $1".R2.fq"}'

Basic Unix. I encourage you to learn it, it is helpful for a career in bioinformatics.

Log in to answer this question.