Need help to understand a problem in a R script
2
1
Entering edit mode
5.5 years ago
psschlogl ▴ 50

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

R rna-seq • 2.1k views
ADD COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode
├── 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 REPLY
1
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
6
Entering edit mode
5.5 years ago

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 COMMENT
3
Entering edit mode

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 REPLY
0
Entering edit mode

Good idea, moved, thanks for that :)

ADD REPLY

Login before adding your answer.

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