This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in path.expand(file) : invalid 'path' argument

Hello! I'm trying to run PSMC on R with the package "psmcr". I first generated a VCF file from a single individual from my population of interest using bcftools mpileup as suggested by the authors of PSMC. Then I used vcf.read to read my variant file:

Pcalif.vcf <- read.vcfR("070_psmc.vcf.gz")

But when I try to create the consensus sequence with the psmcr package with

Pcalif_DNA <- VCF2DNAbin(Pcalif.vcf)

Thsi error comes up

Error in path.expand(file) : invalid 'path' argument

I don't know what may be happening but I would appreciate any help.

rstudio psmcr ubuntu

Ok, so apparently the problem was that I shouldn't have read the vcf file first. The VCF2DNAbin function needs the actual file name to work with. So I should have wrote:

Pcalif_DNA <- VCF2DNAbin("070_psmc.vcf.gz")

Now another error popped up, but I'm trying to figure it out.

0 answers

No answers yet.

Log in to answer this question.