# ipfam or pfam domain-domain interactions

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

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|<description>.*?CDATA$\s*(.*?)\s$.*?</description>|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.

• 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 May 29 '19 at 18:51
• @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 May 29 '19 at 18:52
• Thanks will do, I'm pretty proficient with using R's xml package so hopefully I've got it. – Beeba May 29 '19 at 18:53