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

realpath: missing operand #49

Closed Jawen-D closed 2 years ago

Jawen-D commented 2 years ago

Hello Simone,

After running this script: nohup ./MetONTIIME.sh /home/ihopelab/Microbiome/0809/data/MetONTIIME/KSH_fast5_pass /home/ihopelab/Microbiome/0809/data/MetONTIIME/silva_132_99_16S_sequence.qza home/ihopelab/Microbiome/0809/data/MetONTIIME/silva_132_99_16S_taxonomy.qza & 4 Vsearch 3 0.8 0.85 &

I get a nohup.out file in the working directory then it says:

realpath: missing operand Try 'realpath --help' for more information. ./MetONTIIME.sh: line 86: /manifest.txt: Permission denied ./MetONTIIME.sh: line 94: $SAMPLE_METADATA: ambiguous redirect Usage: qiime tools import [OPTIONS]

Import data to create a new QIIME 2 Artifact. See https://docs.qiime2.org/ for usage examples and details on the file types and associated semantic types that can be imported.

May I ask for some guidance on what to do first? This is my first time running this program

MaestSi commented 2 years ago

Ciao, I see a couple of issues here. In the command: nohup ./MetONTIIME.sh /home/ihopelab/Microbiome/0809/data/MetONTIIME/KSH_fast5_pass /home/ihopelab/Microbiome/0809/data/MetONTIIME/silva_132_99_16S_sequence.qza home/ihopelab/Microbiome/0809/data/MetONTIIME/silva_132_99_16S_taxonomy.qza & 4 Vsearch 3 0.8 0.85 &

the '/' is missing in home/ihopelab/Microbiome/0809/data/MetONTIIME/silva_132_99_16S_taxonomy.qza. Moreover, you have a '&' just after the taxonomy.qza file, which is not correct. I'd advice you to download the latest MetONTIIME version, so that each input is preceeded by a parameter name. Best, Simone

Jawen-D commented 2 years ago

Thank you for the immediate response.

I downloaded and installed the latest MetONTIIME version, I would like to proceed with with the steps where I can "Starting analysis from fastq.gz files" I'm not sure if I edited the suggested script properly: nohup ./MetONTIIME.sh [-w /home/ihopelab/Microbiome/0809/data/MetONTIIME/KSH_fast5_pass] [-f metadata_file] [-s /home/ihopelab/Microbiome/0809/data/MetONTIIME/silva_132_99_16S_sequence.qza] [-t /home/ihopelab/Microbiome/0809/data/MetONTIIME/silva_132_99_16S_taxonomy.qza] [-n num_threads] [-c taxonomic_classifier] [-m max_accepts] [-q min_query_coverage] [-i min_id_thr] &

Also, I dont have a metadata file yet for my input, can i just leave those options as it is? May I ask for some guidance on this

MaestSi commented 2 years ago

No, you have to specify the path to a metadata file, which will be created. For example, the command could be: nohup ./MetONTIIME.sh -w /home/ihopelab/Microbiome/0809/data/MetONTIIME/KSH_fast5_pass -f /home/ihopelab/Microbiome/0809/data/MetONTIIME/KSH_fast5_pass/sample-metadata.tsv -s /home/ihopelab/Microbiome/0809/data/MetONTIIME/silva_132_99_16S_sequence.qza -t /home/ihopelab/Microbiome/0809/data/MetONTIIME/silva_132_99_16S_taxonomy.qza -n 8 -c Vsearch -m 3 -q 0.8 -i 0.85 & Best, Simone

Jawen-D commented 2 years ago

Hello Simone,

I tried running the script you gave me and I got this error message from the nohup.out file:

realpath: missing operand Try 'realpath --help' for more information. ./MetONTIIME.sh: line 86: /manifest.txt: Permission denied ./MetONTIIME.sh: line 94: $SAMPLE_METADATA: ambiguous redirect Usage: qiime tools import [OPTIONS]

Import data to create a new QIIME 2 Artifact. See https://docs.qiime2.org/ for usage examples and details on the file types and associated semantic types that can be imported.

Options: --type TEXT The semantic type of the artifact that will be created upon importing. Use --show-importable-types to see what importable semantic types are available in the current deployment. [required] --input-path PATH Path to file or directory that should be imported. [required] --output-path ARTIFACT Path where output artifact should be written. [required] --input-format TEXT The format of the data to be imported. If not provided, data must be in the format expected by the semantic type provided via --type. --show-importable-types Show the semantic types that can be supplied to --type to import data into an artifact. --show-importable-formats Show formats that can be supplied to --input-format to import data into an artifact. --help Show this message and exit.

                There was a problem with the command:                     

(1/1) Invalid value for '--input-path': Path '/manifest.txt' does not exist.

Edit: no need to report following errors, as they are a direct consequence of the first step failing.

MaestSi commented 2 years ago

Just remove /home/ihopelab/Microbiome/0809/data/MetONTIIME/KSH_fast5_pass/sample-metadata.tsv and /home/ihopelab/Microbiome/0809/data/MetONTIIME/KSH_fast5_pass/manifest.txt files, and rerun the analysis. Also, can you confirm that /home/ihopelab/Microbiome/0809/data/MetONTIIME/KSH_fast5_pass/ directory contains .fastq.gz files? Simone

Jawen-D commented 2 years ago

Hello Simone,

Thank you for your advise. It is now working. I am currently trying to do the same steps using data from two different samples. Should I combine their fastq files in one gz file or keep it separated for it to run?

Jawen-D commented 2 years ago

I keep having this error message:

Plugin error from diversity:

Ordinations with less than two dimensions are not supported.

Debug info has been saved to /tmp/qiime2-q2cli-err-4itm8hhw.log

MaestSi commented 2 years ago

Unless the two samples are two sequencing runs of the same library, it would be better to keep them separated. So, you could create a new directory with both fastq.gz files, and let new manifest and sample-metadata files to be created. The error you get is due to the fact that beta-diversity analyses are not possible for a single sample, you should not get it anymore in case you analyse two samples. Best, Simone

Jawen-D commented 2 years ago

Thank you for the response. I mananged to produce some results by making a separate fastq.gz files for each samples. However, I dont see any taxonomy plot in the output files. How do I proceed to visualize the results in phyloseq?

I found this tutorial: https://forum.qiime2.org/t/tutorial-integrating-qiime2-and-r-for-data-visualization-and-analysis-using-qiime2r/4121

But I'm not sure if its applicable to MetONTIIME results.

MaestSi commented 2 years ago

Did you wait for the completion of the pipeline? You should monitor the status of the pipeline execution by looking at the content of the nohup.out file. If you are not confident with pipeline execution in background you could just omit 'nohup' and '&' from the previous command. Yes, that tutorial seems applicable to MetONTIIME results, to me. Simone

Jawen-D commented 2 years ago

Thank you for your swift response. Yes, the pipeline was completed, yet no taxa-plots were found in the output.