[R] matching doesn't work
@okov|c@@n@m@r|j@ @end|ng |rom gm@||@com
Sat Apr 11 02:05:32 CEST 2020
I am not sure what I am suppose to run from your codes.
Can you just send me lines of codes which I should run? (without part
where you are loading your data frames)
(assuming my files are as I showed them)
Or the whole idea was to remove sep=" " from everywhere?
On Fri, Apr 10, 2020 at 7:01 PM Rasmus Liland <jensrasmus using gmail.com> wrote:
> On 2020-04-10 18:46 -0500, Ana Marija wrote:
> > so if I understand correctly you would just remove sep=" " from my codes?
> > Thank you so much for working on this.
> > Is there is any chance you can change my original code (pasted bellow)
> > with changes you think should work?
> > library(SNPRelate)
> > # get PLINK output
> > plink.genome <- read.table("plink.genome", header=TRUE)
> > snpgdsBED2GDS("output4.bed", "output4.fam","output4.bim", "HapMap.gds")
> > genofile <- snpgdsOpen("HapMap.gds")
> > # get SNPRelate output
> > ibd <- snpgdsIBDMoM(genofile, remove.monosnp=FALSE, kinship=TRUE)
> > # adjust for the orders of sample pair
> > pair.samp <- paste(ibdlist$ID1, ibdlist$ID2, sep=" ")
> > plink.genome <- plink.genome[match(
> > paste(plink.genome$IID1, plink.genome$IID2, sep=" "), pair.samp), ]
> Yes, it seems like my tab separated values got converted to
> spaces ... so comma separated values seemed like a sane choice
> But ... I do not have all those specific files called here ...
> this seems very similar to what you had before ... what is it
> that does not work? Do you get any errors here at all, or?
More information about the R-help