Position specific scoring matrix, protr package
1
0
Entering edit mode
19 months ago

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?

R pssm protr • 420 views
ADD COMMENT
0
Entering edit mode
19 months ago

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 COMMENT

Login before adding your answer.

Traffic: 2204 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6