From fa1c5e35072faae86b05d2a2aaf4077f657ef647 Mon Sep 17 00:00:00 2001 From: typhainepl Date: Fri, 21 Oct 2022 03:02:15 +0100 Subject: [PATCH] update pfam links (#64) --- README.md | 19 ++++++++++--------- data/data.go | 6 +++--- data/pfam.go | 6 +++--- main.go | 2 +- tp53.svg | 6 +++--- workflow/lollipops.cwl | 2 +- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index cba7810..ee81f8e 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,21 @@ # lollipops **Please cite this work as** -* Jay JJ, Brouwer C (2016) Lollipops in the Clinic: Information Dense Mutation Plots for Precision Medicine. PLoS ONE 11(8): e0160519. doi: [10.1371/journal.pone.0160519](http://dx.doi.org/10.1371/journal.pone.0160519). + +- Jay JJ, Brouwer C (2016) Lollipops in the Clinic: Information Dense Mutation Plots for Precision Medicine. PLoS ONE 11(8): e0160519. doi: [10.1371/journal.pone.0160519](http://dx.doi.org/10.1371/journal.pone.0160519). A simple 'lollipop' mutation diagram generator that tries to make things simple and easy by automating as much as possible. It uses the [UniProt REST API](http://www.uniprot.org/uploadlists/) and/or -[Pfam API](http://pfam.xfam.org/help#tabview=tab9) to automate translation +[Pfam API](http://pfam-legacy.xfam.org/help#tabview=tab9) to automate translation of Gene Symbols and lookup domain/motif features for display. If variant changes are provided, it will also annotate them to the diagram using the "lollipops" markers that give the tool it's name. ## Example -Basic usage is just the gene symbol (ex: ``TP53``) and a list of -mutations (ex: ``R273C R175H T125 R248Q``) +Basic usage is just the gene symbol (ex: `TP53`) and a list of +mutations (ex: `R273C R175H T125 R248Q`) ./lollipops TP53 R273C R175H T125 R248Q @@ -24,17 +25,17 @@ More advanced usage allows for per-mutation color (e.g. sample type) and size specification (e.g. denoting number of samples), along with text labels, a legend for abbreviated domains, and more: - ./lollipops -legend -labels TP53 R248Q#7f3333@131 R273C R175H T125@5 + ./lollipops -legend -labels TP53 R248Q#7f3333@131 R273C R175H T125@5 ![TP53 Lollipop diagram with 5 customized mutations](tp53_more.png?raw=true) ## Usage -Usage: ``lollipops [options] {-U UNIPROT_ID | GENE_SYMBOL} [PROTEIN CHANGES ...]`` +Usage: `lollipops [options] {-U UNIPROT_ID | GENE_SYMBOL} [PROTEIN CHANGES ...]` Where **GENE_SYMBOL** is the official human HGNC gene symbol. This will use the official API to lookup the **UNIPROT_ID**. To skip the lookup or use other species, -specify the UniProt ID with -U (e.g. ``-U P04637`` for TP53) +specify the UniProt ID with -U (e.g. `-U P04637` for TP53) #### Protein changes @@ -84,7 +85,7 @@ the area is exponentially proportional to the count indicated. Examples: -uniprot use UniprotKB as an alternative to Pfam for fetching domain/motif information -l=filename.json use local file instead of Pfam API for graphic data - see: http://pfam.xfam.org/help#tabview=tab9 + see: http://pfam-legacy.xfam.org/help#tabview=tab9 ``` ## Installation @@ -93,7 +94,7 @@ Head over to the [Releases](https://github.com/joiningdata/lollipops/releases) t download the latest version for your system in a simple command-line executable. If you already have Go installed and want the bleeding edge, just -``go get -u github.com/joiningdata/lollipops`` to download the latest version. +`go get -u github.com/joiningdata/lollipops` to download the latest version. ## Embedding diff --git a/data/data.go b/data/data.go index 000f614..a886316 100644 --- a/data/data.go +++ b/data/data.go @@ -24,7 +24,7 @@ import ( ) // MotifNames has human-readable names -// - mostly from http://pfam.xfam.org/help#tabview=tab9 +// - mostly from http://pfam-legacy.xfam.org/help#tabview=tab9 var MotifNames = map[string]string{ "disorder": "Disordered region", "low_complexity": "Low complexity region", @@ -66,13 +66,13 @@ func GetLocalGraphicData(filename string) (*GraphicResponse, error) { f.Close() for i, x := range pf.Motifs { if x.Link != "" && !strings.Contains(x.Link, "://") { - x.Link = "http://pfam.xfam.org" + x.Link + x.Link = "http://pfam-legacy.xfam.org" + x.Link pf.Motifs[i] = x } } for i, x := range pf.Regions { if x.Link != "" && !strings.Contains(x.Link, "://") { - x.Link = "http://pfam.xfam.org" + x.Link + x.Link = "http://pfam-legacy.xfam.org" + x.Link pf.Regions[i] = x } } diff --git a/data/pfam.go b/data/pfam.go index db78352..76db025 100644 --- a/data/pfam.go +++ b/data/pfam.go @@ -25,7 +25,7 @@ import ( "os" ) -const PfamGraphicURL = "https://pfam.xfam.org/protein/%s/graphic" +const PfamGraphicURL = "https://pfam-legacy.xfam.org/protein/%s/graphic" func GetPfamGraphicData(accession string) (*GraphicResponse, error) { queryURL := fmt.Sprintf(PfamGraphicURL, accession) @@ -56,13 +56,13 @@ func GetPfamGraphicData(accession string) (*GraphicResponse, error) { r := data[0] for i, x := range r.Motifs { if x.Link != "" { - x.Link = "https://pfam.xfam.org" + x.Link + x.Link = "https://pfam-legacy.xfam.org" + x.Link r.Motifs[i] = x } } for i, x := range r.Regions { if x.Link != "" { - x.Link = "https://pfam.xfam.org" + x.Link + x.Link = "https://pfam-legacy.xfam.org" + x.Link r.Regions[i] = x } } diff --git a/main.go b/main.go index 18bc5db..15f9418 100644 --- a/main.go +++ b/main.go @@ -116,7 +116,7 @@ Alternative input sources: -uniprot use UniprotKB as an alternative to Pfam for fetching domain/motif information -l=filename.json use local file instead of Pfam API for graphic data - see: http://pfam.xfam.org/help#tabview=tab9 + see: http://pfam-legacy.xfam.org/help#tabview=tab9 `) } diff --git a/tp53.svg b/tp53.svg index 33f5c41..7d15056 100644 --- a/tp53.svg +++ b/tp53.svg @@ -11,9 +11,9 @@ - -P53 DNA-binding domain -P53_tetramer + +P53 DNA-binding domain +P53_tetramer 52995125175248273289319358393 diff --git a/workflow/lollipops.cwl b/workflow/lollipops.cwl index 62eb794..27baead 100644 --- a/workflow/lollipops.cwl +++ b/workflow/lollipops.cwl @@ -128,7 +128,7 @@ inputs: prefix: "-uniprot" localDomainFile: doc: "get domain info from a file" - ## see: http://pfam.xfam.org/help#tabview=tab9 + ## see: http://pfam-legacy.xfam.org/help#tabview=tab9 type: File? inputBinding: prefix: "-l="