Tried it but just got a blank text file. Any idea what I might've done wrong?
Extract sequence ids from otu map based on representative sequence id
I have an otu map that I would like to extract sequences id corresponding to specific representative sequence ids. For just one representative sequence id I can do
grep "representativesequenceid" otu_map.txt > output.txt
But I would like to do this for a list of ~100 sequence ids, rather than do this 100 times :) Any ideas?
• 2,857 views
•
link
1 answer
grep -f ids_file otu_map.txt > output.txt
ids_file contains list of your representative sequence ids with one id per line.
grep usage:
$ grep --help | grep '\-f'
-f, --file=FILE obtain PATTERN from FILE
• 0 views
•
link
• 0 views
•
link
did you copy and paste your representative sequence ids into the ids_file ?
• 0 views
•
link
Yes, it is a tab-delimited file with one representative sequence id per line.
• 0 views
•
link
Log in to answer this question.