-
Notifications
You must be signed in to change notification settings - Fork 4
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
snpInsideRunsCpp(runsChrom, mapKrom, genotypeFile) : Not compatible with requested type: [type=character; target=integer] #33
Comments
Dear @aigulsharip , Thank you for your interest in sed 's/X/23/' MS_KAZWG_5.map >> MS_KAZWG_5.fix.map The alternative way, it's to install remove.packages("detectRUNS")
library(devtools)
install_github("bioinformatics-ptp/detectRUNS", subdir="detectRUNS", ref="master") You should get the message |
Thanks a lot for quick response and help. Your recommendation help me to resolve the issue, I have re-installed detectRUNS from github. I have another question. As an example, you have used the data from sheep dataset. I have try to slidingRUNS.run with those paramaters as in the example. The number of ROH for my human samples were quite small (using slidingRuns, summaryList, shown below), for consecutiveRuns (summaryListConsRuns) was even smaller. So I think for human WGS data different parameters should be used. Do you have any suggestions on paramaters and values for healthy human WGS data? When I try to run PLINK with default paramaters and with some modifications, the discrepancy in number of ROH was huge. summaryList$summary_ROH_count
genotypeFilePath = "MS_KAZWG_5.no-tabs.ped" slidingRuns <- slidingRUNS.run( |
Dear @aigulsharip , Unfortunately we have little or no-experience with human WGS data, we work mainly with livestock animals, which are characterized by a different genetic pressure respect to humans (selection, inbreeding, ...). Moreover, this package was developed relying on genechip arrays, where the number of SNPs are limited (50K-600K) and more distributed in genome than in WGS data. In these days my colleagues have started working with WGS goat data, but unfortunately, we haven't identified yet what parameters fit for this type of data. My suggestion is to raise up parameters like Hope it helps |
Thank you very much for suggestions! |
Dear @aigulsharip, I saw you edited your last post before I have time to reply. Regarding read external data using newdata <- readExternalRuns(inputFile="plink_roh.hom", program='plink') Regarding plink parameters, here you can find help about ROH parameters. Using the parameters you provided, you can obtain a similar result using detectRUNS. Here's a table in which different parameters are compared:
I did a simple test on a WGS chromosome with All the best, Paolo |
Good day,
I am using detectRUNS for identification of ROH from five human whole-genome sequencing.
slidingRuns <- slidingRUNS.run(
genotypeFile = "MS_KAZWG_5.no-tabs.ped",
mapFile = "MS_KAZWG_5.map",
windowSize = 15,
threshold = 0.05,
minSNP = 20,
ROHet = FALSE,
maxOppWindow = 1,
maxMissWindow = 1,
maxGap = 10^6,
minLengthBps = 250000,
minDensity = 1/10^3,
maxOppRun = NULL,
maxMissRun = NULL
)
This command work well. But when I try to run summaryRuns() and plot_SnpsInRuns(), error (snpInsideRunsCpp(runsChrom, mapKrom, genotypeFile) : Not compatible with requested type: [type=character; target=integer]) comes up. I am familar that this issue is not unique and some people already wrote it. I have read all the issues and try to fix it. I realize that I need to convert char chromosomes to numeric value, but I don't know how to do it. Maybe I should modify .map or .ped file, but how?
I would appreciate if you could help.
summaryList <- summaryRuns(
runs = slidingRuns, mapFile = "MS_KAZWG_5.map", genotypeFile = "MS_KAZWG_5.no-tabs.ped",
Class = 6, snpInRuns = TRUE)
Checking files...
Using class: 6
Total genome length: 3099072722
calculating Froh on all genome
Total genome length: 3099072722
calculating Froh chromosome by chromosome
Total genome length: 3099072722
calculating Froh by Class
[1] "Class used: >0"
[1] "Class used: >6"
[1] "Class used: >12"
[1] "Class used: >24"
[1] "Class used: >48"
Class created: 0-6Class created: 6-12Class created: 12-24Class created: 24-48Class created: >48
Calculating SNPs inside ROH
Calculation % SNP in ROH
Chromosome founds: 24
| | 0%Error in snpInsideRunsCpp(runsChrom, mapKrom, genotypeFile) :
Not compatible with requested type: [type=character; target=integer].
genotypeFilePath = "MS_KAZWG_5.no-tabs.ped"
mapFilePath = "MS_KAZWG_5.map"
ANOTHER ERROR:
plot_SnpsInRuns(
runs = slidingRuns[slidingRuns$chrom==2,], genotypeFile = genotypeFilePath,
mapFile = mapFilePath)
1] "Chromosome is: 2"
[1] "N. of runs: 26"
[1] "N.of SNP is 870355"
Error in snpInsideRunsCpp(runsChrom, mapChrom, genotypeFile) :
Not compatible with requested type: [type=character; target=integer].
I tried:
The text was updated successfully, but these errors were encountered: