This is a test version of Biostars. For the public version, visit https://www.biostars.org.
PopGenome: How to read in multiple reference chromosomes.

Hi All -

I'm using the R package PopGenome to analyze WGS data from a VCF file. I read in my VCF and GFF files by chromosome, as described in this post. Now I'd like to verify synonymous and non-synonymous substitutions using the set.synnonsyn() function. The set.synnonsyn() function has a ref.chr = option, but I cannot find any details on what format the input chromosome should take when there are in fact multiple chromosomes in play. Should I feed the program a multifasta? Should I point it to a directory that contains individual chromosome fastas, similar to the way we import multiple VCF and GFF files? I've tried this every way I can think of but no luck.

Any help is much appreciated -

popgenome r population-genetics

UPDATE: I'm side-stepping the issue by reading in chromosomes individually, adding reference metadata individually, then combining each of these individual GENOME objects.

Hi,

test <- set.synnonsyn(test, ref.chr=c("chr1.fas","chr2.fas", ... ))

should work fine.

Best

1 answer

Hi,

test <- set.synnonsyn(test, ref.chr=c("chr1.fas","chr2.fas", ... ))

should work fine.

Best

It works! Thanks, that's brilliant. I should have thought of that myself.

Log in to answer this question.