Question: Ballgown data reading problem
0
gravatar for Ricky
18 months ago by
Ricky30
Germany
Ricky30 wrote:

Hi,

Problem: loading data into Ballgown returns error:

> bg = ballgown(dataDir = "ballgown", pData = pheno_data, samplePattern = "Col0")
Tue Jan 23 12:39:59 2018
Tue Jan 23 12:39:59 2018: Reading linking tables
Error in file(file, "rt") : invalid 'description' argument

This is what I did. I am trying to load expression data from StringTie into Ballgown. The "ballgown" directory created by StringTie looks like so:

igz@igz-ubuntu-test ~/Priming/ballgown
$ ls
Col0C1  Col0C2  Col0C3  Col0T1  Col0T2  Col0T3  arabidopsis_phenodata.csv

with each sub dir containing the following files:

igz@igz-ubuntu-test ~/Priming/ballgown/Col0C1
$ ls
Col0C1.gtf  e2t.ctab  e_data.ctab  i2t.ctab  i_data.ctab  t_data.ctab

After starting an R session, I load packages (which already returns me a couple of errors):

 library(ballgown)

Attaching package: 'ballgown'

The following object is masked from 'package:base':

    structure

> library(RSkittleBrewer)
> library(genefilter)

Attaching package: 'genefilter'

The following object is masked from 'package:base':

    anyNA

> library(dplyr)

Attaching package: 'dplyr'

The following objects are masked from 'package:ballgown':

    contains, last

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

> library(ggplot2)
> library(gplots)

Attaching package: 'gplots'

The following object is masked from 'package:stats':

    lowess

> library(devtools)

I then set my working dir and load the pheno_data file:

> setwd("/home/igz/Priming/ballgown")
> getwd()
[1] "/home/igz/Priming/ballgown"
> pheno_data = read.csv("arabidopsis_phenodata.csv")
> pheno_data   
     ids treatment
1 Col0C1   control
2 Col0C2   control
3 Col0C3   control
4 Col0T1 triggered
5 Col0T2 triggered
6 Col0T3 triggered

Next I try to make a ballgown object, which seems to fail.

> bg = ballgown(dataDir = "ballgown", pData = pheno_data, samplePattern = "Col0")
Tue Jan 23 12:39:59 2018
Tue Jan 23 12:39:59 2018: Reading linking tables
Error in file(file, "rt") : invalid 'description' argument

It seems that ballgown can't match data tables with the other arguments. when I check the "ballgown" dir for content I get the following:

> list.files("ballgown")
character(0)

Is it the problem that Ballgown doesn't find the data? How can I fix that?

Thanks, Ricky

rna-seq R • 1.1k views
ADD COMMENTlink modified 18 months ago • written 18 months ago by Ricky30
1

Fixed it! As Hugo suggested, the problem was to run Ballgown from the "ballgown" dir. Moved up one step, copied pheno_data csv to that dir and started session from there.

Thanks.

ADD REPLYlink written 18 months ago by Ricky30

Hello Ricky!

We believe that this post does not fit the main topic of this site.

solved

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLYlink written 18 months ago by Ricky30

closing a post is an action used by mods to flag duplicate/erroneous/incomplete posts. If a question has been solved then it should be marked accepted (green check mark) to provide closure to the thread.

I will move @hugo's comment to an answer which you should accept.

ADD REPLYlink written 18 months ago by genomax69k
1
gravatar for Hugo
18 months ago by
Hugo150
Universidade de Vigo, Ourense (Spain)
Hugo150 wrote:

Hi Ricky,

it seems that you are inside the "ballgown" directory and also telling that the directory that contains your data is "ballgown", which can be understood as "/home/igz/Priming/ballgown/ballgown". Give a try to: bg = ballgown(dataDir = "", pData = pheno_data, samplePattern = "Col0").

Regards,

Hugo.

ADD COMMENTlink modified 15 months ago by RamRS22k • written 18 months ago by Hugo150

Thanks a lot,

tried it, but still the same problem.

> bg = ballgown(dataDir = "", pData = pheno_data, samplePattern = "Col0")
Tue Jan 23 14:30:30 2018
Tue Jan 23 14:30:30 2018: Reading linking tables
Error in file(file, "rt") : invalid 'description' argument
ADD REPLYlink written 18 months ago by Ricky30
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 583 users visited in the last hour