listing library names
2
0
Entering edit mode
5.9 years ago
Sam ▴ 150

Dear all

I have a folder which contains the GBS libs, but I need to prepare a list of the available lib with this format. could you help me?

Thanks

libs name in floder:

CC_12.R1.fq.gz
CC_12.R2.fq.gz

C_1.R1.fq.gz
C_1.R2.fq.gz

BB_16.R1.fq.gz
BB_16.R2.fq.gz


  output list format:

   CC_12
   C_1
   BB_16
bash • 848 views
ADD COMMENT
2
Entering edit mode
5.9 years ago
GenoMax 141k

Here is another

ls *.fq.gz | sed 's/.R[12].fq.gz//' | sort -u > list_of_libraries
ADD COMMENT
1
Entering edit mode
5.9 years ago

Any one them:

$  parallel echo {= s/\\..*// =} ::: *.gz| sort -ur
$  for i in *.gz; do echo ${i%%.*};done | sort -ur
$  ls *.gz| cut -f1 -d"." | sort -ur
ADD COMMENT

Login before adding your answer.

Traffic: 1472 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6