Closed devonorourke closed 6 years ago
From the extension, it seems that you have a .ped
(plain text file) rather than a .bed
(binary file).
Sorry for the delayed reply. It does indeed seem odd that the what I've uploaded is a plain text file instead of a bed, but I can assure you it's not a .ped
file. That's what's confusing me! :)
I take a .vcf file (which was too big to load) and run this PLINK (PLINK v1.90b5.2
) command:
plink
--allow-extra-chr
--out SE
--vcf SEcommon.vcf
This produces a trio of .fam
, .bed
, and .bim
files, including that specious binary file...
To confirm this is indeed a binary, I ran another PLINK test:
plink --adjust --allow-extra-chr --allow-no-sex --assoc \
--bfile SE
This works great. However, if I swap out the last line to --file SE
instead of --bfile SE
the command fails. The file I'm using is a binary file, as best as I can tell.
I've attached this fairly small file to this email in case that helps your troubleshooting.
Thanks again for your help
readBin("~/Téléchargements/SE.bed", what = 1L, n = 3, size = 1, signed = FALSE)
[1] 108 27 1
Seems OK.
Do you have the bim
and fam
files too?
Sure thing (see below). Note I end up manually editing the .fam
file because the info gets transposed incorrectly in that file.
I'm able to run pcadapt()
succesfully with the example you provided.
can you please send me the full script so I can replicate on my local machine?
On Thu, Aug 30, 2018 at 12:26 PM Florian Privé notifications@github.com wrote:
I'm able to run pcadapt() succesfully with the example you provided.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bcm-uga/pcadapt/issues/17#issuecomment-417381063, or mute the thread https://github.com/notifications/unsubscribe-auth/AKqgXMkwAqn2KCL--usftAV-ryB9hHGLks5uWBI3gaJpZM4WOUyE .
-- Devon O'Rourke Graduate student in Molecular and Evolutionary Systems Biology University of New Hampshire
bed <- "~/Téléchargements/SE.bed"
readBin(bed, what = 1L, n = 3, size = 1, signed = FALSE)
# devtools::install_github("bcm-uga/pcadapt")
library(pcadapt)
SEpre <- read.pcadapt(bed, type = "bed")
obj <- pcadapt(input = SEpre, K = 2)
plot(obj)
thanks very much!
I'm starting to think there might have been a version history issue?
I've been testing this on our compute cluster (as that's where all the data lives) but when transferring this snippet of data to my laptop, which has the most recent CRAN version of pcadapt
loaded, things worked without issue.
so strange.
thanks for the support!
Don't worry, thanks for reporting. Don't hesitate if you have any further question.
Hi guys, In following your first tutorial it appears that newer versions of pcadapt require vcf --> bed format conversion for large files. I'm wondering where I'm going wrong. The vcf --> bed file conversion was straightforward in PLINK, and the
read.pcadapt
function appears to accept my modified file:However the
pcadapt
function appears to fail any time I load the object (SEpre
) resulting form theread.pcadapt
function:Any idea where I'm going wrong?
Perhaps you can also update your documentation regarding these file conversions and note that for large files you are now required to convert the
vcf
to a PLINK-formatted.bed
file? Your program provides error messages that are helpful at discerning this is the case, but these weren't posted in your tutorial/manual. In addition it would be great if you can add to the documentation that you must specify the new file astype = "bed"
when running theread.pcadapt
function.I've posted the R
sessionInfo()
below in case that's helpful. Thanks for your help