<p>The following code served my purpose.</p>
<pre><code>library(readr)
pfam_url &lt;-
  'https://pfam.xfam.org/family/PF02171/alignment/uniprot/format?format=pfam&amp;alnType=uniprot&amp;order=t&amp;case=l&amp;gaps=default&amp;download=1'
seqs &lt;-
  read_table(
    pfam_url,
    col_names = FALSE,
    col_types = cols(X1 = col_character(), X2 = col_character())
  )
</code></pre>

CC BY-SA 4.0
2020-10-30T05:40:17.413Z
2020-10-30T06:07:00.517Z
2020-10-30T06:07:00.517Z
RanonKahn
<p>I am trying to download sequence alignments for families against the UniProtKB sequence database as shown in the example below using R code. Can someone kindly suggest me how to?</p>
<pre><code>https://pfam.xfam.org/family/PF02171/alignment/uniprot/format?format=pfam&amp;alnType=uniprot&amp;order=t&amp;case=l&amp;gaps=default&amp;download=1 
</code></pre>

<r>
How to download sequence alignments against UniProtKB sequence database for a particular Pfam Id using R?
# How to download sequence alignments against UniProtKB sequence database for a particular Pfam Id using R?

(Asked by: username_0 on 2020-10-30)

I am trying to download sequence alignments for families against the UniProtKB sequence database as shown in the example below using R code. Can someone kindly suggest me how to?
https://pfam.xfam.org/family/PF02171/alignment/uniprot/format?format=pfam&alnType=uniprotℴ=t&case=l&gaps=default&download=1

**Tags:** r

---

## 1 answers

### Answer by username_0 on 2020-10-30. Score: 2 | Accepted answer

The following code served my purpose.
library(readr)
pfam_url <-
  'https://pfam.xfam.org/family/PF02171/alignment/uniprot/format?format=pfam&alnType=uniprotℴ=t&case=l&gaps=default&download=1'
seqs <-
  read_table(
    pfam_url,
    col_names = FALSE,
    col_types = cols(X1 = col_character(), X2 = col_character())
  )


---

