-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introgress issues with individuals #34
Comments
Indeed. Some big issues in either how vcfR reads in the VCF and then converts it to genind or in your conversion from genind to introgress . I suspect in vcfR. Everything seems good if I start from a gz VCF rather than uncompressed.... |
I think I have found the issue, it is in the genind2introgress function of your package. Line 86 of your code (of genind2introgress.R) , for the admixed input file you do this (not sure why): This gets messed up when you transpose the data upon creating the file:
In addition, your example data admixed input file in the dryad do not have these 2 extra rows/columns, it looks exactly the same as the p1 and p2 input files (as it should be). I am not sure why/when that faulty line in the code was added. Works without it. Cheers, |
This is how I modified the code of the genind2introgress function:
|
Hi there,
I am having an hard time understanding the last few steps of the introgress tutorial. I am running introgress with all the same indidivuals in the previous maxent step, as a test. My genind object has got 380 individuals. I create the files with:
genind2introgress(gen = g_ind, p1 = "parent1", p2 = "parent2", admix = "admixed", prefix=file.path(plotDIR, "eatt"))
Here parent1 parent2 and admixed are my populations defined in @pop of the genind.
Now if I sum the ncol of the resulting input files, they sum to 382. The number of columns of each created input file seem to correspond to the number of individuals in my parent1 and parent2 populations, except the admix file which has 2 extra columns. I don t understand the admix file, as it seems to have rows = SNPs as I have 310 SNPs in my test and 310 rows, but for some reason there are 310 indidividual IDs in the second column which I have no idea what they are. My admixed individuals are 224. The total number of col of admixed input file is 224 + 2.
Then I run introgress, and results from the introgress run are given for 226 indidivuals. This number does not correspond to the admixed indidivuals number (which is 224), does not correspond to the individuals in column 2 of eatt_admix.txt (310 individuals ) and therefore I am unable to go past the subset function:
rasterPoint.list.subset <-
lapply(rasterPoint.list,
subsetIndividuals,
file.path(dataDIR, "inputFiles", "eatt_inds.txt"))
I have no idea which individuals I need to subset from rasterPoint.list (which has all the indidivuals in the genind) to match the 226 in the introgress output, and therefore cannot move to the final function clinesXenvironment.
I think I am missing something.....I am wondering maybe some issues in reading my genind file in how I specified my populations?
The text was updated successfully, but these errors were encountered: