niknakk / snpstats Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Hi,
Thanks for developing snpStats for population genetics analysis.
I am trying to calculate r2 for a bacterial population, there are two columns representing alleles A and B in example data "extdata/sample-long-alleles.gz". For my understanding, these two alleles are from father and mother respectively, which are applicable for diploid organisms. However, bacteria are haploid, may I know how to generate a similar input file for bacteria?
Sorry for miscreating a closed issue.
Thanks and regards,
Xiaojun
Dear NikNakk,
When I use gl.report.ld.map on my genlight snp dataset I get the following warnings: In snpStats:ld(genotype_loci, depth = ld_depth_b, stats = ld_stat) : depth too large; it has been reset to 1. This is something that others have experienced with large datasets as well: https://support.bioconductor.org/p/83618/. What causes this behavior with large read depth and how serious is this warning?
With kind regards,
Frederik
Hi,
I am trying to load 1000 Genome Project data into R through snpStats. I downloaded 1000 g SNPs data from https://www.cog-genomics.org/plink/1.9/resources, where SNPs data could be downloaded separately for each chromosome or simultaneously for all chromosomes. I downloaded 1kg_phase1_chr16.tar.gz file, which is first decompressed through 7-zip to a .tar file, which is further decompressed to 3 files in .bed, .bim, and .fam format. I then used the code below to load the three files into R:
library(snpStats)
path <- "D:\\Downloads"
snps <- read.plink(file.path(path, "1kg_phase1_chr16"), na.strings = ("-9"))
However, I was returned the error message:
Error in `.rowNamesDF<-`(x, value = value) :
duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique value when setting 'row.names': ‘.’
Do you have any ideas to fix this?
Any help is appreciated!
Thanks
Hello,
Firstly, thank you very much for making a really useful package!
I am, however, encountering an issue where there is a hardcoded assumption in plink.R that the data being written by write.plink()
is human.
I am using this library to manipulate plink data containing cattle genomes, which have more than 22 autosomes. Reading in the data with read.plink()
works fine, but writing it back out causes the following fatal error:
unrecognized chromosome name
It would be ideal if there was a flag which could turn off the chromosome name validation (or if it was simply removed altogether). For example, the latest cattle reference genome Btau_5.0.1 has 3,112 unplaced scaffolds in addtion to the normal 29 autosomes.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.