<p>An alternative way is using the Hmmer website, and do a hmmsearch with the Pfam accession, forex. (PF02910). Navigate to the domain tab and find the domain architecture that you are interested in and press view scores. That way, only the sequences you are interested in will be downloadable under the tab downloads. </p>

<p>Step-by-Step guide:</p>

<p>1- Go to <a href="http://www.ebi.ac.uk/Tools/hmmer/" rel="nofollow noreferrer">http://www.ebi.ac.uk/Tools/hmmer/</a></p>

<p>2- Search with hmmsearch <a href="http://www.ebi.ac.uk/Tools/hmmer/search/hmmsearch" rel="nofollow noreferrer">http://www.ebi.ac.uk/Tools/hmmer/search/hmmsearch</a></p>

<p>3- Use Accession search and type in PF02910</p>

<p>4- Navigate to Domain</p>

<p>5- To the right side of 
9742 sequences with domain architecture: FAD_binding_2, Succ_DH_flav_C </p>

<p>Press View scores.</p>

<p>6- It should show (Your results have been filtered) and Query matches (9742)</p>

<p>7- Navigate to Download and download the sequences in the format of interest. </p>

<p>8- Repeat for domain architectures of interest. </p>

<p>I hope you find this helpful.</p>

<p>Kind Regards,</p>

<p>Sara</p>

CC BY-SA 3.0
2017-07-18T13:01:54.007Z
2017-07-18T13:01:54.007Z
sara el-gebali
<p>That does not appear to be possible using PFAM. I would suggest trying a different database. I managed to perform the same query using SMART (<a href="http://smart.embl-heidelberg.de/" rel="nofollow noreferrer">http://smart.embl-heidelberg.de/</a>), via entering "Pfam:FAD_binding_2 AND Pfam:Succ_DH_flav_C" under "Domain selection" in the "Architecture Analysis" section of the search screen, which resulted in 9921 protein sequences with those two domains as you can see <a href="http://smart.embl-heidelberg.de/smart/selective.cgi?domains=Pfam%3AFAD_binding_2+AND+Pfam%3ASucc_DH_flav_C&amp;terms=&amp;taxon_text=&amp;input=Architecture+query" rel="nofollow noreferrer">here</a>.</p>

<p>On the results screen you can select all the sequences and under "Action" at the top of the screen choose "Download Protein Sequences as FASTA file".</p>

CC BY-SA 3.0
2017-07-05T13:59:34.880Z
It's a good idea but the problem is that it's not specific. I need the proteins that just have these two domains and no more. In these 9921 protein sequences, there are sequences which have other domains that make my search inspecific
Sara
CC BY-SA 3.0
2017-07-08T08:23:52.290Z
you gave me a good idea. although it's inspecific but I could simply make it specific. First in "action selection" part, I chose "download protein sequences as a fasta file" and downloaded the fasta file of all sequences and then I chose "generate a Newick tree and iTol formatted dataset" . Then in "iTOL protein dataset file" part, I clicked on "download as tab delimited plain text" and downloaded all protein identifiers with the name of their pfam domain
Sara
CC BY-SA 3.0
2017-07-08T08:23:57.067Z
Then I used python for deleting protein identifiers which had other domains. After that I could go to the fasta file and delete the fasta sequence of extra proteins
Sara
CC BY-SA 3.0
2017-07-05T10:01:28.437Z
2017-07-05T10:01:28.437Z
Imer Muhović
<p>I believe you can do this using SQL files of the database.</p>

<p>First you need to get the integer accession of this architecture. <a href="ftp://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/database_files/architecture.txt.gz" rel="nofollow noreferrer"><code>architecture</code> table</a> has the following columns:</p>

<ul>
<li><code>auto_architecture</code> (integer id, <strong>this is what we need</strong>)</li>
<li><code>architecture</code> (a string describing the architecture)</li>
<li><code>type_example</code> (example sequence)</li>
<li><code>no_seqs</code> (number of sequences)</li>
<li><code>architecture_acc</code> (accessions of the architectures)</li>
</ul>

<p>You need the following line:</p>

<pre><code>3900719357      FAD_binding_2~Succ_DH_flav_C    Z9JRB3  7471    PF00890 PF02910
</code></pre>

<p>Now you need to get the sequences with this architecture id. First, download the <a href="ftp://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/database_files/pfamseq.txt.gz" rel="nofollow noreferrer">file with all the sequences</a> (<strong>warning</strong>, this one is more than 7Gb). With this one you need column #1 (pfam sequence accesion), #12 (sequence itself) and #16 (architecture integer id).</p>

<p>If you do not want to import files in the database, you can use <code>awk</code> to export all the sequences to <code>fasta</code> format.</p>

<pre class="lang-bash prettyprint-override"><code>zcat pfamseq.txt.gz | awk -F\\t '{ if ($16=="3900719357") print "&gt;" $1 "\n" $12}' &gt; sequences.fasta
</code></pre>

<p>Of couse, if you need to perform multiple queries like this, it is much easier to import tables into the database. Then you can perform both queries in a single SQL operation (assuming you know the architecture string):</p>

<pre class="lang-sql prettyprint-override"><code>SELECT pfamseq_acc, sequence
    FROM architecture
    JOIN pfamseq ON pfamseq.auto_architecture=architecture.auto_architecture
    WHERE architecture="FAD_binding_2~Succ_DH_flav_C";
</code></pre>

<p>(I haven't tried this SQL query, so maybe you need to correct it a bit)</p>

CC BY-SA 3.0
2017-07-05T14:20:37.237Z
I think the idea of not importing 7Gb database is better because I have a lot of protein sequences that I want to do similar task on. I prefer trying the second idea, but I don't know why I couldn't get the integer accession of this architecture from above "architecture table" link
Sara
CC BY-SA 3.0
2017-07-05T14:33:35.120Z
Not sure I understand your comment well. In my example I assume you only have the architecture string. If you already have your `auto_architecture` accession, you can simply write `SELECT pfamseq_acc, sequence FROM pfamseq WHERE auto_architecture=3900719357`.
Iakov Davydov
CC BY-SA 3.0
2017-07-05T12:00:40.840Z
2017-07-05T14:35:18.587Z
2017-07-05T14:35:18.587Z
Iakov Davydov
<p>I want to get the alignment of chain A of 1kf6 (PDB ID) from the pfam database <a href="http://pfam.xfam.org/protein/FRDA_ECOLI" rel="nofollow noreferrer">here</a>. This protein chain has two main domains (FAD_binding_2 and    Succ_DH_flav_C). In pfam there is a link to one of these domains and after clicking in one of the mentioned domains in the table below the page, another page comes at the top of which there is a link to architectures. </p>

<p>For example, if we click on "FAD_binding_2" in the table, there are 220 architectures that have this domain and after clicking on that button (at the top of page), a page opens <a href="http://pfam.xfam.org/family/Succ_DH_flav_C#tabview=tab1" rel="nofollow noreferrer">here</a>. In this page 7471 sequences with the following architecture: FAD_binding_2, Succ_DH_flav_C, resembles most to my chain (because it has both FAD_binding_2 and Succ_DH_flav_C domains). </p>

<p>If we want to see all 7471 sequences with that architecture we can click on the show button under that architecture and finally we can see all of that 7471 architecture resembling our chain A sequence. Down the page we can see other architectures that all have FAD_binding_2, but some of them do not have both FAD_binding_2 and Succ_DH_flav_C domains (or some of them have other extra domains that we are not interested in) and so we do not need their sequences and their alignments. </p>

<p>When we want to get the alignment of full sequences at the left side of the page, we can see that we can just get the alignment of all 15696 sequences and it seems that there is no way to get the alignment of our favourite 7471 sequences. I would like to know if there is any way to get the alignment or at least the fasta file of our favourite 7471 sequences (which have both of our favourite domains not just one of them)?</p>

<sequence-homology><domains>
Obtaining all protein sequences with a particular domain architecture from Pfam
# Obtaining all protein sequences with a particular domain architecture from Pfam

(Asked by: username_0 on 2017-07-03)

I want to get the alignment of chain A of 1kf6 (PDB ID) from the pfam database [here](http://pfam.xfam.org/protein/FRDA_ECOLI). This protein chain has two main domains (FAD\_binding\_2 and Succ\_DH\_flav\_C). In pfam there is a link to one of these domains and after clicking in one of the mentioned domains in the table below the page, another page comes at the top of which there is a link to architectures.

For example, if we click on "FAD\_binding\_2" in the table, there are 220 architectures that have this domain and after clicking on that button (at the top of page), a page opens [here](http://pfam.xfam.org/family/Succ_DH_flav_C#tabview=tab1). In this page 7471 sequences with the following architecture: FAD\_binding\_2, Succ\_DH\_flav\_C, resembles most to my chain (because it has both FAD\_binding\_2 and Succ\_DH\_flav\_C domains).

If we want to see all 7471 sequences with that architecture we can click on the show button under that architecture and finally we can see all of that 7471 architecture resembling our chain A sequence. Down the page we can see other architectures that all have FAD\_binding\_2, but some of them do not have both FAD\_binding\_2 and Succ\_DH\_flav\_C domains (or some of them have other extra domains that we are not interested in) and so we do not need their sequences and their alignments.

When we want to get the alignment of full sequences at the left side of the page, we can see that we can just get the alignment of all 15696 sequences and it seems that there is no way to get the alignment of our favourite 7471 sequences. I would like to know if there is any way to get the alignment or at least the fasta file of our favourite 7471 sequences (which have both of our favourite domains not just one of them)?

**Tags:** sequence-homology, domains

---

## 3 answers

### Answer by username_3 on 2017-07-05. Score: 2 | Accepted answer

I believe you can do this using SQL files of the database.
First you need to get the integer accession of this architecture. architecture table has the following columns:

auto_architecture (integer id, this is what we need)
architecture (a string describing the architecture)
type_example (example sequence)
no_seqs (number of sequences)
architecture_acc (accessions of the architectures)

You need the following line:
3900719357      FAD_binding_2~Succ_DH_flav_C    Z9JRB3  7471    PF00890 PF02910

Now you need to get the sequences with this architecture id. First, download the file with all the sequences (warning, this one is more than 7Gb). With this one you need column #1 (pfam sequence accesion), #12 (sequence itself) and #16 (architecture integer id).
If you do not want to import files in the database, you can use awk to export all the sequences to fasta format.
zcat pfamseq.txt.gz | awk -F\\t '{ if ($16=="3900719357") print ">" $1 "\n" $12}' > sequences.fasta

Of couse, if you need to perform multiple queries like this, it is much easier to import tables into the database. Then you can perform both queries in a single SQL operation (assuming you know the architecture string):
SELECT pfamseq_acc, sequence
    FROM architecture
    JOIN pfamseq ON pfamseq.auto_architecture=architecture.auto_architecture
    WHERE architecture="FAD_binding_2~Succ_DH_flav_C";

(I haven't tried this SQL query, so maybe you need to correct it a bit)

> **Comments:**
> **username_0**: I think the idea of not importing 7Gb database is better because I have a lot of protein sequences that I want to do similar task on. I prefer trying the second idea, but I don't know why I couldn't get the integer accession of this architecture from above "architecture table" link  
> **username_3**: Not sure I understand your comment well. In my example I assume you only have the architecture string. If you already have your `auto_architecture` accession, you can simply write `SELECT pfamseq_acc, sequence FROM pfamseq WHERE auto_architecture=3900719357`.  

---

### Answer by username_1 on 2017-07-18. Score: 3

An alternative way is using the Hmmer website, and do a hmmsearch with the Pfam accession, forex. (PF02910). Navigate to the domain tab and find the domain architecture that you are interested in and press view scores. That way, only the sequences you are interested in will be downloadable under the tab downloads.

Step-by-Step guide:

1- Go to <http://www.ebi.ac.uk/Tools/hmmer/>

2- Search with hmmsearch <http://www.ebi.ac.uk/Tools/hmmer/search/hmmsearch>

3- Use Accession search and type in PF02910

4- Navigate to Domain

5- To the right side of
9742 sequences with domain architecture: FAD\_binding\_2, Succ\_DH\_flav\_C

Press View scores.

6- It should show (Your results have been filtered) and Query matches (9742)

7- Navigate to Download and download the sequences in the format of interest.

8- Repeat for domain architectures of interest.

I hope you find this helpful.

Kind Regards,

Sara


---

### Answer by username_2 on 2017-07-05. Score: 2

That does not appear to be possible using PFAM. I would suggest trying a different database. I managed to perform the same query using SMART (<http://smart.embl-heidelberg.de/>), via entering "Pfam:FAD\_binding\_2 AND Pfam:Succ\_DH\_flav\_C" under "Domain selection" in the "Architecture Analysis" section of the search screen, which resulted in 9921 protein sequences with those two domains as you can see [here](http://smart.embl-heidelberg.de/smart/selective.cgi?domains=Pfam%3AFAD_binding_2+AND+Pfam%3ASucc_DH_flav_C&terms=&taxon_text=&input=Architecture+query).

On the results screen you can select all the sequences and under "Action" at the top of the screen choose "Download Protein Sequences as FASTA file".

> **Comments:**
> **username_0**: It's a good idea but the problem is that it's not specific. I need the proteins that just have these two domains and no more. In these 9921 protein sequences, there are sequences which have other domains that make my search inspecific  
> **username_0**: you gave me a good idea. although it's inspecific but I could simply make it specific. First in "action selection" part, I chose "download protein sequences as a fasta file" and downloaded the fasta file of all sequences and then I chose "generate a Newick tree and iTol formatted dataset" . Then in "iTOL protein dataset file" part, I clicked on "download as tab delimited plain text" and downloaded all protein identifiers with the name of their pfam domain  
> **username_0**: Then I used python for deleting protein identifiers which had other domains. After that I could go to the fasta file and delete the fasta sequence of extra proteins  

---

