Dan,
I made the following changes to assoc.scan1 on my local copy. I could not make changes to your github of course. These allow sanger ID to be row names of return data frame, helping user identify key SNPs. Below is diff part. That is, around line 427 of assoc.map.R I added
row.sdps <- sdps$id
which I then use at the end of the function:
row.names(out) <- row.sdps
I changed the return() to out <- in three places to have out available.
Brian
426
426
Convert the DO haplotype probabilities to Sanger alleles.
Dan, I made the following changes to assoc.scan1 on my local copy. I could not make changes to your github of course. These allow sanger ID to be row names of return data frame, helping user identify key SNPs. Below is diff part. That is, around line 427 of assoc.map.R I added row.sdps <- sdps$id which I then use at the end of the function: row.names(out) <- row.sdps I changed the return() to out <- in three places to have out available. Brian
426 426
Convert the DO haplotype probabilities to Sanger alleles.
427
Kludge: Preserve Sanger ID for output.
428 row.sdps <- sdps$id 427 429 sdps = cbind(pos = sdps[,2], sdp = sdps[,ncol(sdps)], sdps[,-c(1:5,ncol(sdps))]) ... 426 426
Convert the DO haplotype probabilities to Sanger alleles.
427
Kludge: Preserve Sanger ID for output.
428 row.sdps <- sdps$id 427 429 sdps = cbind(pos = sdps[,2], sdp = sdps[,ncol(sdps)], sdps[,-c(1:5,ncol(sdps))]) ... 426 426
Convert the DO haplotype probabilities to Sanger alleles.
427
Kludge: Preserve Sanger ID for output.
428 row.sdps <- sdps$id 427 429 sdps = cbind(pos = sdps[,2], sdp = sdps[,ncol(sdps)], sdps[,-c(1:5,ncol(sdps))]) ... 483
484
485 out <- data.frame(chr = rep(markers[1,2], length(stat)),
486 sdp = sdps, LOD = stat)
487
489
Kludge to get row names, which are SNPs.
490 row.names(out) <- row.sdps
491 out