Roleren / ORFik

MIT License
32 stars 9 forks source link

read.experiment() Error in validateExperiments(df) : File does not exist #184

Closed SuhasSrinivasan closed 1 month ago

SuhasSrinivasan commented 4 months ago

Hi,

Hope you are having a good summer.

R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.4 LTS
ORFik 1.24.0  

I tried to see what is causing the validateExperiments issue, but it is not clear. This issue did not exist in 1.23.10. I am using the same script, only the data/directories are different.

sata = '~/sata/e-mtab-6141'
nvme = '~/nvme/autoimm'
config_csv = file.path(sata, 'orfik_config.csv')
fastq_dir = file.path(sata, 'fastq')
bam_dir = file.path(nvme, 'bam')
exp_dir = file.path(sata, 'orfik_expr')
ref_dir = file.path('~/Bio_data/references')

config.save(config_csv, fastq_dir, bam_dir, ref_dir, exp_dir)

config(old_config_location = config_csv)

conf = config.exper(experiment = '6141', 
                          assembly = 'hs_assembly',
                          type = c('RNA-seq'))

conf['fastq RNA-seq'] = '~/sata/e-mtab-6141/fastq/'

organism = 'Homo sapiens'

annotation = getGenomeAndAnnotation(
  organism = organism,
  genome = T, GTF = T, 
  phix = T, ncRNA = T, tRNA = T, rRNA = T,
  output.dir = conf['ref'],
  assembly_type = 'primary_assembly'
)

star_index = STAR.index(annotation, wait = T, max.cpus = 24, max.ram = 100)

STAR.align.folder(conf['fastq RNA-seq'], conf['bam RNA-seq'], star_index,
                  paired.end = T, quality.filtering = T, 
                  steps = 'tr-co-ge', max.cpus = 24)

create.experiment(file.path(conf['bam RNA-seq'], 'aligned/'),
                  exper = conf['exp RNA-seq'],
                  fa = annotation['genome'],
                  txdb = paste0(annotation['gtf'], '.db'),
                  organism = organism,
                  pairedEndBam = T)

exp_df = read.experiment(conf['exp RNA-seq'])
Error in experiment:6141_RNA-seq
Error in validateExperiments(df) : File does not exist:
 File does not exist:

https://github.com/Roleren/ORFik/blob/151d72ecea242f67da908bfd9abd72809ee979ae/R/experiment.R#L98-L102