Error in path.expand(file) : invalid 'path' argument
1
0
Entering edit mode
2.7 years ago

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 • 1.1k views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 1953 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