GithubHelp home page GithubHelp logo

snpstats's People

Contributors

niknakk avatar

Watchers

James Cloos avatar

snpstats's Issues

Long format data for bacterial population

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

snpStats:ld depth too large

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

Loading 1000 g data: Error in `.rowNamesDF<-`(x, value = value): duplicate 'row.names' are not allowed

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

write.plink() assumes human genome

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.