MaestSi / MetONTIIME

A Meta-barcoding pipeline for analysing ONT data in QIIME2 framework
GNU General Public License v3.0
78 stars 17 forks source link

Problem with finding the path 'workDir' #110

Closed sebastianavalon closed 1 month ago

sebastianavalon commented 1 month ago

Hi. I have a problem with the path to the fastq.gz files apparently not existing. Of course it is created and fastq.gz has 'barcode' in its name. I run Metontiime from WSL (ubuntu). I did not make any key changes in the .conf and .nf files, I only gave the paths to the folder with the *fastq.gz (workdir) and resultsdir files to check if the beginning of processing starts. And here the problem appears, because nextflow does not find the given paths with files (or 1 file). Experience with pipelines is new to me and I am just starting my adventure with this matter.



``` /mnt/c/Users/avalo/metontiime$ nextflow -c metontiime2.conf run metontiime2.nf --workDir="/home/avalo/metontiime/diana" --resultsDir="/home/avalo/metontiime/results" -profile docker

 N E X T F L O W   ~  version 24.04.4

Launching `metontiime2.nf` [big_kimura] DSL2 - revision: cadfc622f6

executor >  local (2)
executor >  local (2)
[-        ] process > importDb (1)          -
[0d/536bd3] process > concatenateFastq      [100%] 1 of 1, failed: 1 ✘
[-        ] process > filterFastq           -
[-        ] process > downsampleFastq       -
[-        ] process > importFastq           -
[-        ] process > derepSeq              -
[-        ] process > assignTaxonomy        -
[-        ] process > filterTaxa            -
[-        ] process > taxonomyVisualization -
[-        ] process > collapseTables        -
[-        ] process > dataQC                -
[-        ] process > diversityAnalyses     -
ERROR ~ Error executing process > 'concatenateFastq'

Caused by:
  Process `concatenateFastq` terminated with an error exit status (1)

Command executed:

  mkdir -p /home/avalo/metontiime/results
  mkdir -p /home/avalo/metontiime/results/concatenateFastq
  cp /home/avalo/metontiime/diana/*fastq.gz /home/avalo/metontiime/results/concatenateFastq

Command exit status:
  1

Command output:
  (empty)

Command error:
  cp: cannot stat '/home/avalo/metontiime/diana/*fastq.gz': No such file or directory

Work dir:
  /mnt/c/Users/avalo/metontiime/work/0d/536bd3e53e6285e5fa7cf48db44918

Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`

 -- Check '.nextflow.log' file for details
MaestSi commented 1 month ago

Hi, did you remember to mount, i.e. to make accessible to Docker, both /home/avalo and /mnt/c/Users/avalo directories? You can do that by editing line 173 of metontiime2.conf file from: containerOptions = '-v /home/:/home' to containerOptions = '-v /home/avalo:/home/avalo -v /mnt/c/Users/avalo:/mnt/c/Users/avalo' Best, SM

MaestSi commented 1 month ago

Hi, I hope this solved the issue. In case it didn't, feel free to reopen it. Best, SM

sebastianavalon commented 1 month ago

Yes, problem solved. However, paths starting with /home/ did not work, but full mnt/c/... did. Thank you. If I have further problems I will create a new issue, or I will continue here, as you prefer.

MaestSi commented 1 month ago

It could be that /home/avalo is a path inside WSL, but it is physically located on the disk at /mnt/c etc...? In any case, glad it worked. SM

sebastianavalon commented 1 month ago

"It could be that /home/avalo is a path inside WSL, but it is physically located on the disk at /mnt/c etc...?"

sebastianavalon commented 1 month ago

Ok. I've almost reached the end. I am using only single barcodes, small files ~30mb. The biggest problem is the database, because from the "true" position downloading the database didn't work, I saw in previous issues that other people had problems with it, so I downloaded SILVA manually. Now everything is processed almost to the end. Now the problem is with the last step 'diversityAnalyses (1)' -> it can't find from 'table-collapsed-absfreq-level6.qza' the table that I really care about. And in fact in the results there is only the table 'feature-table-relfreq-level1' and OTUs assigned only to bacteria, and where are the rest of the taxonomic levels? I ran the same barcode through Epi2me and Kraken generated several dozen lines to the genus level. I don't know if I downloaded the wrong SILVA? Or is the problem somewhere else?

Best, Sebastian

MaestSi commented 1 month ago

Hi, in the collapseTables process there is this line: num_levels=\$(echo \$(cat ${params.dbTaxonomyTsv} | head -n2 | tail -n1 | cut -f2 | grep -n -o \";\" | wc -l) + 1 | bc) where the number of semicolumn-separated (;) levels in the database are counted. It could be that in your dbTaxonomyTsv file levels are not separated by this character? Best, SM