Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
RNASeq paired-end strand specific attribute location in FASTA file mknut Bioinformatics 2 12-06-2012 08:44 AM
Extract only sequence ids from fasta file with makeblastdb angeloulivieri Bioinformatics 13 07-30-2012 02:41 AM
how to get specific length sequence from a fasta file entomology Bioinformatics 5 07-12-2012 03:59 PM
Searching for substitutions in a VCF file Rubal7 Bioinformatics 0 02-07-2012 10:03 AM
Perl: get specific base from FASTA file. njh_TO Bioinformatics 6 02-02-2012 05:34 AM

Thread Tools
Old 07-19-2013, 03:01 AM   #1
Junior Member
Location: England

Join Date: Jul 2013
Posts: 2
Default Question: Searching FASTA file for specific IDs

Hi all,

Apologies if this is answered elsewhere, I've searched for it but can't find!

I have a list of UniProt IDs (e.g., Q95T64 Q8INK6 Q9GNK5) and want to search through them all (n=~450) to see if they exist in a fasta file of a species, outputting two lists, one list of the IDs that do appear in the species fasta, and one list of those that do not!

Grep perhaps?

Many thanks


EDIT: The list of IDs are contained within a .txt file, return seperated
aw90 is offline   Reply With Quote
Old 07-19-2013, 03:14 AM   #2
Senior Member
Location: sub-surface moon base

Join Date: Apr 2013
Posts: 372

Something like:

grep '>' species.fasta | grep -f idFile.txt > HeaderLinesThatMatch.txt
grep '>' species.fasta | grep -v -f idFile.txt > HeaderLinesThatDoNotMatch.txt

Might work, might not. I'm too lazy to check how the second command behaves..

Last edited by rhinoceros; 07-19-2013 at 03:18 AM.
rhinoceros is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 06:47 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO