R Programming for Differential Gene Expression Analysis
2
0
Entering edit mode
3.6 years ago

I am using a ballgown to create objects. I have only three samples (b73,f1, and mo17). These three samples are present in this path (Ballgwon>samples>b73,f1,mo17>all CTAB files). I want to do a Differential gene expression analysis.

I am trying to run this command: (bg = ballgown(dataDir= "samples", samplePattern = "ERR", pData=pheno_data).

Error: Tue May 25 17:34:22 2021 Tue May 25 17:34:22 2021: Reading linking tables Error in file(file, "rt") : invalid 'description' argument

I have tried multiple ways but all failed. Can anybody help me. I am not lazy to do it by myself but I am trying it for 4 days. Thanks for understanding!

Ballgown RNA-SEQ Programming R DEG • 3.1k views
ADD COMMENT
0
Entering edit mode

To start with, brackets are not closed. Do not know if it is copy/paste problem or code error. Try posting tree of the datadir ('samples") here.

ADD REPLY
0
Entering edit mode

That could have been an editing error when I fixed the format. If so my bad. Muhammad Haroon : Please confirm and fix as needed by editing original post.

ADD REPLY
0
Entering edit mode

I did not start with brackets, it was just written to show here..

ADD REPLY
0
Entering edit mode

Can you please run this first? Go to wherever samples directory is and from there execute:

bg = ballgown(dataDir= "samples", samplePattern = "ERR", meas="all"). 

If that fails, can you print tree of samples directory?

$ cd samples
$ tree . -L 1 

and if possible

 $ tree . -P "*.ctab"
ADD REPLY
0
Entering edit mode

this is R bro, not Linux.

ADD REPLY
0
Entering edit mode

bg = ballgown(dataDir= "samples", samplePattern = "ERR", meas="all")

I tried the above command as you suggested but it's not working. Same error!

ADD REPLY
0
Entering edit mode

Please print output from getwd() and > list.dirs() say. Confirm if your samples are b73,f1,mo17 as posted in OP.

ADD REPLY
0
Entering edit mode

getwd() [1] "C:/Users/MALIK UMAIR ALI/Desktop/Ballgown/samples"

ADD REPLY
0
Entering edit mode

yes, all directories are being shown.

ADD REPLY
0
Entering edit mode

Please post the screenshot of outcome from list.dirs() here.

ADD REPLY
0
Entering edit mode

enter image description here

ADD REPLY
0
Entering edit mode

enter image description here

ADD REPLY
0
Entering edit mode

In these directories, I have .ctab files for each sample like b73, f1, and mo17.

ADD REPLY
0
Entering edit mode

well, your sample pattern furnished in ballgown function, is incorrect. Could you please post output from phenodata[,1] ?

ADD REPLY
0
Entering edit mode

$ sample_path <- paste( "C:/Users/MALIK UMAIR ALI/Desktop/Ballgown/samples",pheno_data[,1], sep = '/') $ bg = ballgown(samples=as.vector(sample_path),pData=pheno_data)

Thanks! Both of these commands worked. Would you like to explain what was the reason? I will be obliged to you..

ADD REPLY
1
Entering edit mode
3.6 years ago

try this and post the output:

$ bg = ballgown(dataDir= ".", samplePattern = "ERR", meas="all")

Please check your sample names and pattern. From what you posted as your samples, sample pattern is not matching.

Try also this:

$ sample_path <- paste( "C:/Users/MALIK UMAIR ALI/Desktop/Ballgown/samples",pheno_data[,1], sep = '/')
$ bg = ballgown(samples=as.vector(sample_path),pData=pheno_data)

This also may throw error as there are spaces in id. If so, please escape the space in your id.

ADD COMMENT
0
Entering edit mode

brother. Thank you so much. These both command worked. Would like to describe what was the problem as these two commands worked very well..

ADD REPLY
0
Entering edit mode

enter image description here

ADD REPLY
2
Entering edit mode

I think you have created ballgown object now. Proceed with rest of the workflow.

ADD REPLY
0
Entering edit mode

Hi, I am running a Ballgown package of R to find DEGs in my samples. I have three samples (b73,f1, and mo17). I have run all the initial commands successfully. I have given the very right paths and I am sure about that. But for a specific command like in below, I am facing difficulty. I have a separate file by the name of CSV file which is usually edited by the author byself because it contains the information of samples and their characteristics.

Command;

results_transcripts <- stattest(bg_filt, feature="transcript", covariate="sex", adjustvars = c("population"), getFC=TRUE, meas="FPKM")

Output:

*Error in stattest(bg_filt, feature = "transcript", covariate = "sex", :

There must be at least two replicates per group. Make sure covariate is categorical; if continuous, consider the timecourse option, or specify your own models with mod and mod0.*

ADD REPLY
0
Entering edit mode
3.6 years ago
Zhilong Jia ★ 2.2k

reading and running the vignette of ballgown will be helpful to you.

it seems you gave the wrong dataDir parameter (relative path and absolute path?). Probably the wrong samplePattern parameter as well.

From the manual: dataDir : file path to top-level directory containing sample-specific folders with ballgown data in them. Only used if samples is NULL.

samplePattern : regular expression identifying the subdirectories of\ dataDir containing data to be loaded into the ballgown object (and only those subdirectories). Only used if samples is NULL.

ADD COMMENT
0
Entering edit mode

Actually all the data files are present in ballgown directory as you can see in the above picture. While CSV files was created by myself in which I have put the names of all samples like b73, f1 and mo17.

ADD REPLY

Login before adding your answer.

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