<p>I think you're looking for <a href="ftp://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/database_files/pfamA_interactions.txt.gz" rel="nofollow noreferrer">ftp://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/database_files/pfamA_interactions.txt.gz</a>. Based on the file's name, that's a list of domain interactions. The file has two columns, so presumably each line represents an interaction. </p>

<p>Here's what I get for the Death domain (PF00531):</p>

<pre><code>$ zgrep PF00531 pfamA_interactions.txt.gz 
PF00036 PF00531
PF00531 PF14786
PF00531 PF00531
PF00791 PF00531
PF01335 PF00531
PF13499 PF00531
PF13833 PF00531
PF14786 PF00531
</code></pre>

<p>Those are 8 interactions, which matches what the PFam link you gave in your question shows. If you want to convert the accessions to something more informative, you could try Pfam's REST API and do something like:</p>

<pre><code><span class="math-container">$ zgrep PF00531 pfamA_interactions.txt.gz | 
    while read a b; do 
    name1=$</span>(wget -O - "https://pfam.xfam.org/family/<span class="math-container">${a}?output=xml" 2&gt;/dev/null | 
     perl -00lne 'm|&lt;description&gt;.*?CDATA\[\s*(.*?)\s\].*?&lt;/description&gt;|s &amp;&amp; print $</span>1'); 
    name2=<span class="math-container">$(wget -O - "https://pfam.xfam.org/family/$</span>{b}?output=xml" 2&gt;/dev/null | 
     perl -00lne 'm|&lt;description&gt;.*?CDATA\[\s*(.*?)\s\].*?&lt;/description&gt;|s &amp;&amp; print <span class="math-container">$1'); 
    printf "%s\t%s\t%-20s\t%-25s\n" "$</span>a" "<span class="math-container">$b" "$</span>name1" "$name2"; 
done
PF00036 PF00531 EF hand                 Death domain             
PF00531 PF14786 Death domain            Tube Death domain        
PF00531 PF00531 Death domain            Death domain             
PF00791 PF00531 ZU5 domain              Death domain             
PF01335 PF00531 Death effector domain   Death domain             
PF13499 PF00531 EF-hand domain pair     Death domain             
PF13833 PF00531 EF-hand domain pair     Death domain             
PF14786 PF00531 Tube Death domain       Death domain         
</code></pre>

<p>Obviously, if you need anything more fancy than that, it's time to write a proper parser using Perl or Python or any other language that can understand XML.</p>

CC BY-SA 4.0
2019-05-29T18:51:24.137Z
This is it! I had found the pfamA_interactions.txt.gz file but didn't know how to get the IDs from accession. This is great thanks.
Beeba
CC BY-SA 4.0
2019-05-29T18:52:54.277Z
@Beeba you're welcome :) But this is going to be horribly slow and inefficient if you have more than a dozen or so IDs. If you need to deal with many, do consider writing a proper parser. If you need help with that, you can always ask another question here!
terdon
CC BY-SA 4.0
2019-05-29T18:53:19.870Z
Thanks will do, I'm pretty proficient with using R's xml package so hopefully I've got it.
Beeba
CC BY-SA 4.0
2019-05-29T18:46:56.477Z
2019-05-29T18:53:10.393Z
2019-05-29T18:53:10.393Z
terdon
<p>I'd like to download domain-domain interactions that were in ipfam (which doesn't seem to be up-and-running anymore).</p>

<p>for an example of what I would like to be able to download via ftp or another source, see this list of interactions with Death domain:
<a href="https://pfam.xfam.org/family/PF00531#tabview=tab8" rel="nofollow noreferrer">https://pfam.xfam.org/family/PF00531#tabview=tab8</a></p>

<p>Is this available in one of these files in the current release??
<a href="ftp://ftp.ebi.ac.uk/pub/databases/Pfam/current_release" rel="nofollow noreferrer">ftp://ftp.ebi.ac.uk/pub/databases/Pfam/current_release</a></p>

<interactions><domains>
ipfam or pfam domain-domain interactions
# ipfam or pfam domain-domain interactions

(Asked by: username_0 on 2019-05-29)

I'd like to download domain-domain interactions that were in ipfam (which doesn't seem to be up-and-running anymore).

for an example of what I would like to be able to download via ftp or another source, see this list of interactions with Death domain:
<https://pfam.xfam.org/family/PF00531#tabview=tab8>

Is this available in one of these files in the current release??
<ftp://ftp.ebi.ac.uk/pub/databases/Pfam/current_release>

**Tags:** interactions, domains

---

## 1 answers

### Answer by username_1 on 2019-05-29. Score: 0 | Accepted answer

I think you're looking for ftp://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/database_files/pfamA_interactions.txt.gz. Based on the file's name, that's a list of domain interactions. The file has two columns, so presumably each line represents an interaction. 
Here's what I get for the Death domain (PF00531):
$ zgrep PF00531 pfamA_interactions.txt.gz 
PF00036 PF00531
PF00531 PF14786
PF00531 PF00531
PF00791 PF00531
PF01335 PF00531
PF13499 PF00531
PF13833 PF00531
PF14786 PF00531

Those are 8 interactions, which matches what the PFam link you gave in your question shows. If you want to convert the accessions to something more informative, you could try Pfam's REST API and do something like:
$ zgrep PF00531 pfamA_interactions.txt.gz | 
    while read a b; do 
    name1=$(wget -O - "https://pfam.xfam.org/family/${a}?output=xml" 2>/dev/null | 
     perl -00lne 'm|.*?CDATA\[\s*(.*?)\s\].*?|s && print $1'); 
    name2=$(wget -O - "https://pfam.xfam.org/family/${b}?output=xml" 2>/dev/null | 
     perl -00lne 'm|.*?CDATA\[\s*(.*?)\s\].*?|s && print $1'); 
    printf "%s\t%s\t%-20s\t%-25s\n" "$a" "$b" "$name1" "$name2"; 
done
PF00036 PF00531 EF hand                 Death domain             
PF00531 PF14786 Death domain            Tube Death domain        
PF00531 PF00531 Death domain            Death domain             
PF00791 PF00531 ZU5 domain              Death domain             
PF01335 PF00531 Death effector domain   Death domain             
PF13499 PF00531 EF-hand domain pair     Death domain             
PF13833 PF00531 EF-hand domain pair     Death domain             
PF14786 PF00531 Tube Death domain       Death domain         

Obviously, if you need anything more fancy than that, it's time to write a proper parser using Perl or Python or any other language that can understand XML.

> **Comments:**
> **username_0**: This is it! I had found the pfamA_interactions.txt.gz file but didn't know how to get the IDs from accession. This is great thanks.  
> **username_1**: @Beeba you're welcome :) But this is going to be horribly slow and inefficient if you have more than a dozen or so IDs. If you need to deal with many, do consider writing a proper parser. If you need help with that, you can always ask another question here!  
> **username_0**: Thanks will do, I'm pretty proficient with using R's xml package so hopefully I've got it.  

---

