Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phoeguo committed Jul 29, 2024
1 parent f303f99 commit 3f42971
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Binary file modified data/hgnc2pfam.df.rda
Binary file not shown.
10 changes: 5 additions & 5 deletions prepare_data/generate_hgnc2pfam.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ for(idx in 1:nrow(uniprot_to_parse_df)){
message("Download Pfam data from Pfam website ...")
pfam_url <- "ftp://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/proteomes/9606.tsv.gz"
pfam_fn <- "prepare_data/9606.tsv.gz"
download.file(pfam_url, pfam_fn)
# download.file(pfam_url, pfam_fn)

# --------------------------
message("Read Pfam information ...")
Expand All @@ -87,11 +87,11 @@ pfam_sub_df <- pfam_df[, c("id", "start", "end", "hmm.acc", "hmm.name", "type")]

# merge by UniProt
message("Generating mapping table ...")
hgnc2pfam_df <- merge(uniprot_single_df, pfam_sub_df, by.x="uniprot", by.y = "id", all.x=TRUE, sort = FALSE)
hgnc2pfam_df <- hgnc2pfam_df[with(hgnc2pfam_df, order(symbol, uniprot, start, end)), ]
hgnc2pfam_df <- hgnc2pfam_df[, c("symbol", "uniprot", "length",
hgnc2pfam.df <- merge(uniprot_single_df, pfam_sub_df, by.x="uniprot", by.y = "id", all.x=TRUE, sort = FALSE)
hgnc2pfam.df <- hgnc2pfam.df[with(hgnc2pfam.df, order(symbol, uniprot, start, end)), ]
hgnc2pfam.df <- hgnc2pfam.df[, c("symbol", "uniprot", "length",
"start", "end", "hmm.acc", "hmm.name", "type")]

# create Rdata, move this to "data" directory
save(hgnc2pfam_df, file="hgnc2pfam.df.rda", compress = "xz")
save(hgnc2pfam.df, file="data/hgnc2pfam.df.rda", compress = "xz")

0 comments on commit 3f42971

Please sign in to comment.