Question: Position specific scoring matrix, protr package
0
gravatar for nonaa.lucin
3 days ago by
nonaa.lucin0 wrote:

I'm trying to calculate "PSSM feature" using protr package. I tried to adapt the example in the documentation to fit my data, but I always get an error.

Here is my code:

x <- readFASTA('P08195.fasta')[[1]]
dbpath <- tempfile("tempdb", fileext = ".fasta")
invisible(file.copy(from = system.file('P08195.fasta'),to = dbpath) )

pssmmat <- extractPSSM(seq = x, database.path = dbpath)
pssmfeature <- extractPSSMFeature(pssmmat)
head(pssmfeature)

Here is the error message:

Warning message in readLines(file):
"incomplete final line found on 'P08195.fasta'"
Warning message in file(con, "r"):
"cannot open file 'C:\Users\Adham\AppData\Local\Temp\RtmpaGM54r\protrPSIBlast433023ad2ce8.pssm': No such file or directory"
Error in file(con, "r"): cannot open the connection
Traceback:

1. extractPSSM(seq = x, database.path = dbpath)
2. readLines(PSSMfile)
3. file(con, "r")

I'm not so familiar with R since I use Python mainly. How can I solve this issue?

protr pssm R • 42 views
ADD COMMENTlink modified 3 days ago • written 3 days ago by nonaa.lucin0
0
gravatar for nonaa.lucin
3 days ago by
nonaa.lucin0 wrote:

found the solution: the error came from system.file('P08195.fasta') , I just removed it , the correct code is:

x <- readFASTA('P08195.fasta')[[1]]
dbpath <- tempfile("tempdb", fileext = ".fasta")
invisible(file.copy('P08195.fasta',to = dbpath) )
pssmmat <- extractPSSM(seq = x, database.path = dbpath)
pssmfeature <- extractPSSMFeature(pssmmat)
head(pssmfeature)
ADD COMMENTlink written 3 days ago by nonaa.lucin0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1960 users visited in the last hour