This would be a naive question to ask in this group, but it is important to me.
I am doing a genomewide SNP analysis on a clonal organism and I am using GATK for the same. My output file contains SNPs is in the form of VCF file and I would like to perform various analysis mentioned in the paper. In that case how should I proceed or start with?
if (!require("devtools")) install.packages("devtools")
devtools::install_github("emmanuelparadis/pegas/pegas")
devtools::install_github("knausb/vcfR@devel")
devtools::install_github("thibautjombart/adegenet")
devtools::install_github("grunwaldlab/poppr@devel")
Once you have your data in a genlight object, convert it to a snpclone object with the function as.snpclone() (yes, I know there are quite a few steps to get here). This will make sure that you can have mutlilocus genotype definitions travel with your data. From here, you can:
Hope that helps.
Best,
Zhian
--
You received this message because you are subscribed to the Google Groups "poppr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to poppr+un...@googlegroups.com.
To post to this group, send email to po...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/b1304e01-a94e-40dd-aa57-d5cd3fc9ebeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Nov 6, 2015, at 21:44 , jigar trivedi <jig...@gmail.com> wrote:
Hi Zhian,
Maybe I was doing it the wrong way. How should I install devtools on Mac OS?
On Friday, 6 November 2015 17:55:24 UTC-5, Zhian Kamvar wrote:
Can you elaborate on this? Installing devtools at the moment is a necessary step until the packages are updated on CRAN. R tools is not a platform from which to install packages, it is a set of tools that plug into R to allow you to build packages that contain compiled code. What is the error you get when you try to install devtools?
Zhian
> On Nov 6, 2015, at 14:29 , jigar trivedi <jig...@gmail.com> wrote:
>
> Hi Zhian,
>
> I am not able to install devtools and Pegas. I am doing that through R tools.
>
> On Monday, 2 November 2015 17:15:39 UTC-5, jigar trivedi wrote:
>
> This would be a naive question to ask in this group, but it is important to me. I am doing a genomewide SNP analysis on a clonal organism and I am using GATK for the same. My output file contains SNPs is in the form of VCF file and I would like to perform various analysis mentioned in the paper. In that case how should I proceed or start with?
>
> --
> You received this message because you are subscribed to the Google Groups "poppr" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to poppr+un...@googlegroups.com.
> To post to this group, send email to po...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/0d2aa140-3a64-4e7e-a837-8381dbbc3b33%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "poppr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to poppr+un...@googlegroups.com.
To post to this group, send email to po...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/e93c8a3a-fe37-449a-b92a-bcfeabb00c4f%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/a75ffdb3-1f20-4f34-9c3b-320c1f5cc681%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/fc3f31d4-406a-4821-bca9-1a960acb1b0b%40googlegroups.com.
On Dec 5, 2016, at 03:17 , Melanie Montes <melanie...@gmail.com> wrote:
Hi,I'm using poppr for the first time on a data set of about 70 individuals x 55 000 snps, and also on a thinned data set where I only selected snps that are more than 1kb apart for running the Index of association to avoid physical linkage. I have a couple of questions:(1) Is it WRONG to import SNP data as a genind/genclone object rather than genlight/snpclone, or just slower?(2) Is there any way to add my population data (which individuals belong to which population) after I've created the genclone/snpclone object? It seems that having the pop data is essential to a lot of the analyses.Thanks for any advice you can give!Best,Melanie
On Monday, November 2, 2015 at 11:51:59 PM UTC+1, Zhian Kamvar wrote:
Hi,
This would be a naive question to ask in this group, but it is important to me.Naïve questions are quite welcome in this group, as it provides a resource for others who will likely have the same question :)
I am doing a genomewide SNP analysis on a clonal organism and I am using GATK for the same. My output file contains SNPs is in the form of VCF file and I would like to perform various analysis mentioned in the paper. In that case how should I proceed or start with?
This is a good question. One important factor we left out of the Frontiers paper was how exactly to import genome-wide data from VCF format. There are two packages that you can use to extract genotypes from a VCF file, pegas(https://github.com/emmanuelparadis/pegas) and vcfR (https://github.com/knausb/vcfR).
Both of these packages have valuable tools for analysis and visualization of genomic data. From either of these packages, you can convert to a matrix, which you can then convert to a genlight object (see the adegenet "genomics" tutorial: https://github.com/thibautjombart/adegenet/blob/master/tutorials/tutorial-genomics.pdf).
Before you start, I would recommend at this time to install the github versions of the packages as there are many bug fixes and improvements that aren't on CRAN as of yet. You can do this using devtools (you must also have a C compiler working on your computer, see here for links to options https://github.com/grunwaldlab/poppr/#stable-and-development-versions):
if (!require("devtools")) install.packages("devtools")
devtools::install_github("emmanuelparadis/pegas/pegas")
devtools::install_github("knausb/vcfR@devel")
devtools::install_github("thibautjombart/adegenet")
devtools::install_github("grunwaldlab/poppr@devel")
Once you have your data in a genlight object, convert it to a snpclone object with the function as.snpclone() (yes, I know there are quite a few steps to get here). This will make sure that you can have mutlilocus genotype definitions travel with your data. From here, you can:
- Calculate raw genetic distance with bitwise.dist()
- Define multilocus lineages with mlg.filter()
- Calculate sliding windows of the standardized index of association with win.ia()
- Randomly sample loci for the standardized index of association with samp.ia()
- Construct minimum spanning networks with poppr.msn()
- Create boostrapped dendrograms with aboot()
Hope that helps.
Best,
Zhian
--
You received this message because you are subscribed to the Google Groups "poppr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to poppr+un...@googlegroups.com.
To post to this group, send email to po...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/18e684ac-380a-479f-9f38-bd2f445b43b0%40googlegroups.com.
> gl
||| SNPCLONE OBJECT |||||||||
|| 68 genotypes, 55,288 binary SNPs, size: 7 Mb
1201510 (31.96 %) missing data
|| Basic content
@gen: list of 68 SNPbin
@mlg: 68 original multilocus genotypes
@ploidy: ploidy of each individual (range: 2-2)
|| Optional content
@ind.names: 68 individual labels
@loc.names: 55288 locus labels
@chromosome: factor storing chromosomes of the SNPs
@position: integer storing positions of the SNPs
@other: a list containing: elements without names
popmap <- read.table("rad_pop.csv", header = TRUE, sep = ","
pop(gl) <- popmap
Error in `pop<-`(`*tmp*`, value = list(X = c(11L, 10L, 12L, 13L, 14L, :
Vector length does no match number of individuals
To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/f575f824-8d3d-4c98-a1b5-a82fb26ae482%40googlegroups.com.
> head(popmap)
X pop
1 196-2 M4
2 196 M4
3 219 M4
4 220 M4
5 220-2 M4
6 233 M4
@pop: population of each individual (group size range: 1-1)
To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/32ea5bf6-997e-4f38-9955-1186ee21ea25%40googlegroups.com.