Data Import Issue detectRUNS R
1
0
Entering edit mode
15 months ago
Whirlingdaf ▴ 60

I am running into an issue when importing data with detectRUNS in R.

The following commands to import PLINK files have not been successful, and result in blank data frames.

genotypeFilePath <- system.file("extdata", "genome.ped",package="detectRUNS")
mapFilePath <- system.file("extdata", "genome.map", package="detectRUNS")

head(genotypeFilePath)
[1] ""

The PLINK data are correctly formatted.

OR

I also attempted to import ROH data from bcftools, with the same result.

savedRunFile <- system.file("extdata", "ROH", package="detectRUNS")
runs <- readExternalRuns(inputFile = savedRunFile, program = "BCFtools")
head(runs)

The bcftools output seems to be correct as well:

# RG    [2]Sample       [3]Chromosome   [4]Start        [5]End  [6]Length (bp)  [7]Number of markers    [8]Quality (average fwd-bwd phred score)
# ST    [2]Sample       [3]Chromosome   [4]Position     [5]State (0:HW, 1:AZ)   [6]Quality (fwd-bwd phred score) 
ST      C_101 chr1    2527    1       3.0 
ST      C_101 chr1    2537    1       37.5

However I still end up with no data successfully imported

head(readExternalRuns) 
[1] ""

Any insight would be greatly appreciated. Thank you!

R detectRUNS ROH • 984 views
ADD COMMENT
0
Entering edit mode

Where are your genome.ped/map files located? You need to provide path to your map and genotype types files like this-

genotypeFilePath <- "/pathToYourGenotype/genome.ped"
mapFilePath <- "/pathToYourGenotype/genome.map"
ADD REPLY
0
Entering edit mode

Thanks, they are actually within the working directory. But I also added the full path just in case, with the same result...

ADD REPLY
0
Entering edit mode
15 months ago
bk11 ★ 3.0k

You providing just path to your .ped and .map files and reading them. Therefore head(genotypeFilePath) will show you nothing.

ADD COMMENT
0
Entering edit mode

Ah, I see! I was confused as I was following the workflow suggested in the vignette. Thank you.

ADD REPLY
0
Entering edit mode

I've moved bk11's comment to an answer. Please accept it to mark the post as solved.

ADD REPLY

Login before adding your answer.

Traffic: 1571 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6