wdecoster / NanoPlot

Plotting scripts for long read sequencing data
http://nanoplot.bioinf.be
MIT License
401 stars 48 forks source link

NanoPlot: error: one of the arguments --fastq --fasta --fastq_rich --fastq_minimal --summary --bam --ubam --cram --pickle --feather is required #357

Closed lucyintheskyzzz closed 4 months ago

lucyintheskyzzz commented 4 months ago

Hi I am getting an error message, which is weird because I used the same code I used a few days ago:

!/bin/bash

SBATCH -A loni_virus2023 ### Allocation name

SBATCH -p single ## queue name

SBATCH -t 2:00:00 ## wall time

SBATCH -N 1 ## number of nodes

SBATCH -n 16 ## number of tasks

SBATCH -c 47 ## number of cores per task

SBATCH -o nanoplot.out ## standard output file

SBATCH -e nanoplot.err ## standard error file

SBATCH --mail-type FAIL

SBATCH --mail-type BEGIN

SBATCH --mail-type END

SBATCH --mail-user kvigil@tulane.edu

SBATCH -J nanoplot_seawater ## job name

activate conda

source /usr/local/packages/python/3.9.7-anaconda/etc/profile.d/conda.sh

Load the Nanoplot module conda activate nanoplot-env

NanoPlot 1.32.1 version

Define the directory containing FASTQ files fastq_dir="/work/kvigil/ONR020124_oyster/concatenate/concatenate"

Define the output directory for Nanoplot results output_dir="${fastq_dir}/nanoplot_results"

Create the Nanoplot results directory if it doesn't exist mkdir -p "$output_dir"

Iterate over all FASTQ files in the directory for fastq_file in "${fastq_dir}"/*.fastq.gz; do

Check if the current file is a regular file

if [[ -f "$fastq_file" ]]; then

Run Nanoplot on the current FASTQ file

NanoPlot -t 48 -o "${output_dir}/$(basename ${fastq_file%.fastq.gz})" "$fastq_file" fi done

error message from log file: usage: NanoPlot [-h] [-v] [-t THREADS] [--verbose] [--store] [--raw] [--huge] [-o OUTDIR] [-p PREFIX] [--tsv_stats] [--maxlength N] [--minlength N] [--drop_outliers] [--downsample N] [--loglength] [--percentqual] [--alength] [--minqual N] [--runtime_until N] [--readtype {1D,2D,1D2}] [--barcoded] [--no_supplementary] [-c COLOR] [-cm COLORMAP] [-f {eps,jpeg,jpg,pdf,pgf,png,ps,raw,rgba,svg,svgz,tif,tiff}] [--plots [{kde,hex,dot,pauvre} [{kde,hex,dot,pauvre} ...]]] [--listcolors] [--listcolormaps] [--no-N50] [--N50] [--title TITLE] [--font_scale FONT_SCALE] [--dpi DPI] [--hide_stats] (--fastq file [file ...] | --fasta file [file ...] | --fastq_rich file [file ...] | --fastq_minimal file [file ...] | --summary file [file ...] | --bam file [file ...] | --ubam file [file ...] | --cram file [file ...] | --pickle pickle | --feather file [file ...]) NanoPlot: error: one of the arguments --fastq --fasta --fastq_rich --fastq_minimal --summary --bam --ubam --cram --pickle --feather is required

wdecoster commented 4 months ago

NanoPlot: error: one of the arguments --fastq --fasta --fastq_rich --fastq_minimal --summary --bam --ubam --cram --pickle --feather is required

lucyintheskyzzz commented 4 months ago

Yup thats the error I posted. Ill just change the code from: NanoPlot -t 48 -o "${output_dir}/$(basename ${fastq_file%.fastq.gz})" "$fastq_file"

to

NanoPlot -t 48 -o "${output_dir}/$(basename ${fastq_file%.fastq.gz})" --fastq "$fastq_file"

And see if that works.

lucyintheskyzzz commented 4 months ago

Hi I updated my code and now I get this error: see logs

NanoPlot -t 48 -o "${output_dir}/$(basename ${fastq_file%.fastq.gz})" --fastq "$fastq_file"

nanoplot (3).zip

lucyintheskyzzz commented 4 months ago

I figured this out. My fastq.gz files were not fastq.gz they were .fastq files (weird, because they had fastq.gz as the file names), so I ended up converting all of them to actual fastq.gz files and it seems to be working now.