I want to get the alignment of chain A of 1kf6 (PDB ID) from the pfam database here. 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. 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)?
Obtaining all protein sequences with a particular domain architecture from Pfam
sequence homology;pfam;domains
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 PF02910Now 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.fastaOf 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)