Question: Need help to understand a problem in a R script
1
gravatar for psschlogl
11 months ago by
psschlogl30
psschlogl30 wrote:

Hi guys I am really sorry to bother you to help me on this! I am following a tutorial that I am almost finishing but I got to understand what its going on. I have a csv like this:

$>cat UHR_vs_HBR.csv
"ids","type","path"
"UHR_Rep1","UHR"," /media/paulo/44691167-b916-42ad-87f0-b215c6ef2e6c/paulo/bioinfo/griffithlab/RNAseq_Bioinformatics/RNA_DIR/expression/stringtie/ref_only/UHR_Rep1"
"UHR_Rep2","UHR"," /media/paulo/44691167-b916-42ad-87f0-b215c6ef2e6c/paulo/bioinfo/griffithlab/RNAseq_Bioinformatics/RNA_DIR/expression/stringtie/ref_only/UHR_Rep2"
"UHR_Rep3","UHR"," /media/paulo/44691167-b916-42ad-87f0-b215c6ef2e6c/paulo/bioinfo/griffithlab/RNAseq_Bioinformatics/RNA_DIR/expression/stringtie/ref_only/UHR_Rep3"
"HBR_Rep1","HBR"," /media/paulo/44691167-b916-42ad-87f0-b215c6ef2e6c/paulo/bioinfo/griffithlab/RNAseq_Bioinformatics/RNA_DIR/expression/stringtie/ref_only/HBR_Rep1"
"HBR_Rep2","HBR"," /media/paulo/44691167-b916-42ad-87f0-b215c6ef2e6c/paulo/bioinfo/griffithlab/RNAseq_Bioinformatics/RNA_DIR/expression/stringtie/ref_only/HBR_Rep2"
"HBR_Rep3","HBR"," /media/paulo/44691167-b916-42ad-87f0-b215c6ef2e6c/paulo/bioinfo/griffithlab/RNAseq_Bioinformatics/RNA_DIR/expression/stringtie/ref_only/HBR_Rep3"

This csv has the fullpath to the dir(HBR and UHR samples) where are located each of the samples files :
e2t.ctab
e_data.ctab
gene_abundances.tsv
i2t.ctab
i_data.ctab
t_data.ctab
transcripts.gtf

The R script is this one: enter link description here

But at the start i got this error:

    Error in ballgown(samples = as.vector(pheno_data$path), pData = pheno_data) : 
  Something is wrong: are you missing .ctab files? Do extra files/folders (other than tablemaker output folders) match your samples/dataDir/samplePattern argument(s)?

I know that my paths are very weird but I forgot to adjust my Ubuntu installation 8) so... I know that ballgown is complaining about reading the folders and the files in them.

Do you see something I didn't? PS- any other code works with these ugly full paths.

Thank you all! Paulo


Update

Hey Guys I tried to clean the space typo, put some others ' " ' that were missing, but still complaining. 8(

    Error in ballgown(samples = as.vector(pheno_data$path), pData = pheno_data) : 
  must provide either "samples" or both "dataDir" and "samplePattern"

I will try to make that file again.
I will let you know.
Thanks to all!

UPDATE
I change the samples to a dir ballgown and make the file with paths again and its working!
Thanks to all!
Paulo

rna-seq R • 517 views
ADD COMMENTlink modified 11 months ago • written 11 months ago by psschlogl30
1

You seem to be doing everything right. This is odd. Can you paste the output of:

tree /media/paulo/44691167-b916-42ad-87f0-b215c6ef2e6c/paulo/bioinfo/griffithlab/RNAseq_Bioinformatics/RNA_DIR/expression/stringtie/ref_only/
ADD REPLYlink written 11 months ago by RamRS27k
├── UHR_Rep1
│   ├── e2t.ctab
│   ├── e_data.ctab
│   ├── gene_abundances.tsv
│   ├── i2t.ctab
│   ├── i_data.ctab
│   ├── t_data.ctab
│   └── transcripts.gtf
├── UHR_Rep2
│   ├── e2t.ctab
│   ├── e_data.ctab
│   ├── gene_abundances.tsv
│   ├── i2t.ctab
│   ├── i_data.ctab
│   ├── t_data.ctab
│   └── transcripts.gtf
├── UHR_Rep3
│   ├── e2t.ctab
│   ├── e_data.ctab
│   ├── gene_abundances.tsv
│   ├── i2t.ctab
│   ├── i_data.ctab
│   ├── t_data.ctab
│   └── transcripts.gtf
└── UHR_vs_HBR.csv

Its looks like the kind of tree tha ballgown uses:

extdata/
    sample01/
        e2t.ctab
        e_data.ctab
        i2t.ctab
        i_data.ctab
        t_data.ctab
    sample02/
        e2t.ctab
        e_data.ctab
        i2t.ctab
        i_data.ctab
        t_data.ctab
    ...
    sample20/
        e2t.ctab
        e_data.ctab
        i2t.ctab
        i_data.ctab
        t_data.ctab

But I don't know why it doesn't head my data 8(

ADD REPLYlink modified 11 months ago • written 11 months ago by psschlogl30
1

Yeah, you seem to be doing things the right way. Maybe check permissions on the files? If that doesn't help, maybe someone else can help you out. Sorry!

ADD REPLYlink written 11 months ago by RamRS27k

If you have more info, please update "edit" your post, use answers box for solutions only.

ADD REPLYlink written 11 months ago by zx87549.2k
6
gravatar for Philipp Bayer
11 months ago by
Philipp Bayer6.6k
Australia/Perth/UWA
Philipp Bayer6.6k wrote:

Could it be this:

 "UHR_Rep1","UHR"," /media/paulo/44691167-b916-42ad-87f0-b215c6ef2e6c/paulo/bioinfo/griffithlab/RNAseq_Bioinformatics/RNA_DIR/expression/stringtie/ref_only/UHR_Rep1"

There's an extra space before '/media/' which maaaybe confuses ballgown

ADD COMMENTlink modified 11 months ago • written 11 months ago by Philipp Bayer6.6k
3

This might be the issue, compare the outputs of:

# no leading space, list all file in current directory
list.files("./")

# [typo?] with leading space
list.files(" ./")

@PhilippBayer, maybe move to answer?

ADD REPLYlink modified 11 months ago • written 11 months ago by zx87549.2k

Good idea, moved, thanks for that :)

ADD REPLYlink written 11 months ago by Philipp Bayer6.6k
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: 1225 users visited in the last hour