This is a test version of Biostars. For the public version, visit https://www.biostars.org.
extracting one gene rpkm from 200 txt files

I have 200 txt file of different samples and want to extract one genes read count from all these files. What should be the easiest way? Understand a basic question but sometime you get lost and googling also may not lead you any where. Thanks

rna-seq

1 answer

I would grep for the gene name like grep 'Genename' *.rpkmfiles.

Edit: Yes, use -w as mentioned below to avoid partial matches of gene names.

You might want to add a -w to make sure not to get matches to other gene names containing your search pattern. Something like gene "ABC" might otherwise also match gene "ABCD" or gene "AABC2"..

Log in to answer this question.