Ballgown Error .null(pData) | class(pData) == "data.frame" are not all TRUE
1
0
Entering edit mode
aaubry89 • 0
@aaubry89-19609
Last seen 5.8 years ago

Hi,

I apologize if this is the wrong place to ask this question or if it's been asked already but I am having an issue with ballgown. I'm trying to perform the analysis on data that is associated with the Pertea et al, 2016 nature protocol paper. My issue is with step 9. Here Is my code

library(ballgown) library(RSkittleBrewer) library(genefilter) library(dplyr) library(devtools) pheno_data <-read.csv("geuvadis_phenodata.csv") bg_chrX = ballgown(dataDir = "ballgown", samplePattern = "ERR", pData = pheno_data)

The error I get is

Fri Jan 25 12:20:27 2019: Reading linking tables
Fri Jan 25 12:20:27 2019: Reading intron data files
Fri Jan 25 12:20:28 2019: Merging intron data
Fri Jan 25 12:20:28 2019: Reading exon data files
Fri Jan 25 12:20:29 2019: Merging exon data
Fri Jan 25 12:20:29 2019: Reading transcript data files
Fri Jan 25 12:20:29 2019: Merging transcript data
Error in ballgown(dataDir = "ballgown", samplePattern = "ERR", pData = pheno_data) : 
  is.null(pData) | class(pData) == "data.frame" are not all TRUE`

However if I run all(pheno_data$ids ==list.files("ballgown")) I get TRUE. So I'm a bit confused. Any help is appreciated.

software error ballgown • 1.3k views
ADD COMMENT
1
Entering edit mode
Alyssa Frazee ▴ 210
@alyssa-frazee-6710
Last seen 4.0 years ago
San Francisco, CA, USA

The error seen here is "is.null(pData) | class(pData) == "data.frame" are not all TRUE. It looks like the command you ran below (whether phenodata$ids == list.files("ballgown")) is a step ahead of what's going wrong and is not actually addressing the class of phenodata. I'd evaluate is.null(phenodata) and class(phenodata) to see which of those two things (null or data.frame) is a problem.

For what it's worth, the code looks correct to me (read.csv should produce a data frame, rather than e.g. what you might get with readcsv), so I'd recommend poking more deeply at what phenodata is in order to figure out what's up!

ADD COMMENT
0
Entering edit mode

A simple as.dataframe(phenodata) fixes the problem. Thanks!!

ADD REPLY

Login before adding your answer.

Traffic: 768 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