Biostar Beta. Not for public use.
listing library names
0
Entering edit mode
18 months ago
Sam • 110

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 • 347 views
ADD COMMENTlink
2
Entering edit mode
27 days ago
genomax 68k
United States

Here is another

ls *.fq.gz | sed 's/.R[12].fq.gz//' | sort -u > list_of_libraries
ADD COMMENTlink
1
Entering edit mode
17 months ago
India

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 COMMENTlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3.1