On Fri, Apr 10, 2020 at 2:54 PM Duncan Murdoch wrote:
> On 10/04/2020 3:46 p.m., Ana Marija wrote:
> > I have in current directory from 
> > where I would run this function a 
> > file named output4.bed
>
> Just use "output4.bed" as the 
> filename.  The system.file() function 
> is for working out the filename of 
> files installed in packages.
>
> > what is "extdata" ? Do I need it if 
> > my output4.bed is in the directory 
> > from where I am running this?

"extdata" is a directory of five example 
files from the SNPRelate package: 
hapmap_geno.gds, plinkhapmap.bed.gz, 
plinkhapmap.bim.gz, plinkhapmap.fam.gz, 
and sequence.vcf.  On my system the 
directory is in 
~/R/x86_64-pc-linux-gnu-library/3.6/SNPRelate/extdata 
...

> > Also do I need to have .gz format of 
> > output4.bed?

Not if the files were not gzipped, you 
do not.  Example files in packages are 
compressed to save space for example 
code you will maybe will try only once, 
four of the files in that directory are 
gzipped, I do not know about that vCard 
file ...  Just input your own paths.

Try to find your files using 
list.files(".", "bed$") or something 
...

On 2020-04-10 14:49 -0500, Ana Marija wrote:
> I tried to do this but I got this 

Thus, try this:

  bed.fn <- "output4.bed"
  fam.fn <- "output4.fam"
  bim.fn <- "output4.bim"
  SNPRelate::snpgdsBED2GDS(bed.fn, fam.fn, bim.fn, "output4.gds")

Best,
Rasmus

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to