I am trying to summarize quant.sf files from 9 samples. I am trying to follow this vignette (bioconductor.org/packages/devel/bioc/vignettes/tximport/inst/doc/tximport.html).

My quant.sf files are in 9 different sample files in a directory named 'Salmon'.

I created a vector of file names by:

> samples <- read.table(file.path(dir, "samples.txt"), header = TRUE)
> samples
                          files group_name names
1 sample_1_S1_R1_001.trim.fastq        Air Air_1
2 sample_2_S2_R1_001.trim.fastq        Air Air_2
3 sample_3_S3_R1_001.trim.fastq        Air Air_3
4 sample_4_S4_R1_001.trim.fastq    O3_24hr  24_1
5 sample_5_S5_R1_001.trim.fastq    O3_24hr  24_2
6 sample_6_S6_R1_001.trim.fastq    O3_24hr  24_3
7 sample_7_S7_R1_001.trim.fastq    O3_72hr  72_1
8 sample_8_S8_R1_001.trim.fastq    O3_72hr  72_2
9 sample_9_S9_R1_001.trim.fastq    O3_72hr  72_3

I tried pointing to the files by:

> files <- c("/scratch/lcs152/transcripts_quant/salmon/sample_1_S1_R1_001.trim.fastq/quant.sf", "/scratch/lcs152/transcripts_quant/salmon/sample_2_S2_R1_001.trim.fastq/quant.sf", "/scratch/lcs152/transcripts_quant/salmon/sample_3_S3_R1_001.trim.fastq/quant.sf", "/scratch/lcs152/transcripts_quant/salmon/sample_4_S4_R1_001.trim.fastq/quant.sf", "/scratch/lcs152/transcripts_quant/salmon/sample_5_S5_R1_001.trim.fastq/quant.sf", "/scratch/lcs152/transcripts_quant/salmon/sample_6_S6_R1_001.trim.fastq/quant.sf", "/scratch/lcs152/transcripts_quant/salmon/sample_7_S7_R1_001.trim.fastq/quant.sf", "/scratch/lcs152/transcripts_quant/salmon/sample_8_S8_R1_001.trim.fastq/quant.sf", "/scratch/lcs152/transcripts_quant/salmon/sample_9_S9_R1_001.trim.fastq/quant.sf")

Then adding names by:

>names(files) <- paste0(samples$name)

Then I checked to see the files were named properly:

> files
                                                                            Air_1 
"/scratch/lcs152/transcripts_quant/salmon/sample_1_S1_R1_001.trim.fastq/quant.sf" 
                                                                            Air_2 
"/scratch/lcs152/transcripts_quant/salmon/sample_2_S2_R1_001.trim.fastq/quant.sf" 
                                                                            Air_3 
"/scratch/lcs152/transcripts_quant/salmon/sample_3_S3_R1_001.trim.fastq/quant.sf" 
                                                                             24_1 
"/scratch/lcs152/transcripts_quant/salmon/sample_4_S4_R1_001.trim.fastq/quant.sf" 
                                                                             24_2 
"/scratch/lcs152/transcripts_quant/salmon/sample_5_S5_R1_001.trim.fastq/quant.sf" 
                                                                             24_3 
"/scratch/lcs152/transcripts_quant/salmon/sample_6_S6_R1_001.trim.fastq/quant.sf" 
                                                                             72_1 
"/scratch/lcs152/transcripts_quant/salmon/sample_7_S7_R1_001.trim.fastq/quant.sf" 
                                                                             72_2 
"/scratch/lcs152/transcripts_quant/salmon/sample_8_S8_R1_001.trim.fastq/quant.sf" 
                                                                             72_3 
"/scratch/lcs152/transcripts_quant/salmon/sample_9_S9_R1_001.trim.fastq/quant.sf"

But when I check to see if they exist, it tells me they don't:

> all(file.exists(files))
[1] FALSE

I'm very much a novice and not sure if the information I've provided is helpful. Any guidance would be appreciated!



Source link