jianhong / daglogo Goto Github PK
View Code? Open in Web Editor NEWVisualize significant conserved amino acid sequence pattern in groups based on probability theory
Visualize significant conserved amino acid sequence pattern in groups based on probability theory
When trying to plot using dagLogo(t0) function,
I get an error saying:
Error in grid.Call.graphics(C_setviewport, vp, TRUE) :
non-finite location and/or size for viewport
This does not happen with the provided example data, but happens with every other data I tried. All other plotting functions (dagheatmap(t0), dagLogo(t1-t4)) work fine.
Reproducible example:
pept <- c("PSHDNEAGSVDNSEISQLLQSAATKASSLVS",
"SKPLQLKGNSENVNDSQDEEYRDDATLVKSP",
"LAAVAAASETNGKLGSEEQPEITIPKPRSSA",
"DIPVFLQIFHNFKRDSQSFLDDTVKEYTLIV",
"EAMRREMEAAMEEEISGDEEEGKTVAYLGTG",
"ESWGKQQEHQPPRKSSLETIVEKKSQAEPSG",
"EEPENNTVIEGVKEESQPDENTKEMDEVEED",
"DIPIPTSSHLLKGIDSDNDNVIREDDTGINT",
"EAVKFELSEAINNTPSLDRESERQEEEQDKE",
"DEKLTRRNELKDRSGSGTPFFETSLGREEDN")
UniProt.ws <- UniProt.ws(taxId=4932)
proteome <- prepareProteome(UniProt.ws=UniProt.ws)
#prepare dagPeptides
seq <- formatSequence(seq=pept, proteome=proteome,
upstreamOffset=15, downstreamOffset=15)
#build background model
bg <- buildBackgroundModel(seq, bg="wholeGenome", proteome=proteome)
t0 <- testDAU(seq, bg)
t1 <- testDAU(seq, bg, group="classic")
t2 <- testDAU(seq, bg, group="charge")
t3 <- testDAU(seq, bg, group="chemistry")
t4 <- testDAU(seq, bg, group="hydrophobicity")
dagHeatmap(t0)
dagLogo(t0)
dagLogo(t1, namehash=nameHash(t1@group), legend=TRUE)
Hi,
I was working with the dagLogo package for sometimes and everything worked smoothly, but suddenly I'm getting so many errors for a script that was working two months ago.
First, there was an error when I used the prepareProteome function (below)
proteome <- prepareProteome("UniProt", species = "Rattus norvegicus")
Error:
Downloading data for species: Rattus norvegicus
trying URL 'http://www.uniprot.org/uniprot/?query=organism:10116&format=fasta'
Error in download.file(url = url, destfile = tempFile, ...) :
cannot open URL 'http://www.uniprot.org/uniprot/?query=organism:10116&format=fasta'
In addition: Warning message:
In download.file(url = url, destfile = tempFile, ...) :
cannot open URL 'https://rest.uniprot.org/uniprotkb/query=organism:10116&format=fasta': HTTP status was '400 Bad Request'
I also tried "homo sapien" and got the same error. Anyway, I resolved this by downloading the fasta file from UniProt.
Second, which I'm still stuck with it, is for fetchSequence function:
seq <- fetchSequence(toupper(as.character(df$symbol)),
type = "uniprotswissprot",
anchorAA = as.character(df$anchor),
anchorPos = as.character(df$peptides),
proteome = proteome,
upstreamOffset=7,
downstreamOffset=7)
Error:
Error in rep(seq.int(nrow(dat)), lengths(anchorPos)) :
invalid 'times' argument
Here is the df table:
symbol peptides anchor
1 A0A0G2K5E8 GPKGENGIVGPTGPVGAAGPSGPNGPPGPAGSRGDGGPPGMTGfPGAAGR f
2 A0A0G2K5E8 GSDGSVGPVGPAGPIGSAGPPGfPGAPGPKGELGPVGNPGPAGPAGPR f
3 A0A0G2K5E8 GAPGPDGNNGAQGPPGPQGVQGGKGEQGPAGPPGfQGLPGPSGTAGEVGKPGER f
Can you help me with this? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.