MaestSi / MetONTIIME

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

Error in PycoQC #56

Closed ysuzuki1978 closed 1 year ago

ysuzuki1978 commented 1 year ago

The base call in gupply has been completed, but the following error has occurred.

Do we need to describe new parameters in config_MinION_mobile_lab.R?


Demultiplexing and PCR primers trimming started at Wed Dec 21 06:45:47 2022 ONT Guppy barcoding software version 6.4.2+97a7f06 input path: /home/yakuri/nanopore/16S_rRNA_20221018/no_sample/20221018_1928_MN38820_FAV42892_85448306/fast5_analysis/basecalling save path: /home/yakuri/nanopore/16S_rRNA_20221018/no_sample/20221018_1928_MN38820_FAV42892_85448306/fast5_analysis/preprocessing min. score front: 60 min. score rear: 60

Found 1860 input files.

0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----|


Done in 1714688 ms. Demultiplexing and PCR primers trimming finished at Wed Dec 21 07:14:58 2022

Number of basecalled reads: 3717050

Creating folder: /home/yakuri/nanopore/16S_rRNA_20221018/no_sample/20221018_1928_MN38820_FAV42892_85448306/fast5_analysis/qc, which is going to include stats about the sequencing run

Now performing quality control with PycoQC

Error: object 'pair_strands_flag_cpu' not found Execution halted


ysuzuki1978 commented 1 year ago

pycoQC worked with following command. Please tell us what is being done after pycoQC.


pycoQC -f ./fast5_analysis/basecalling/sequencing_summary.txt -b ./fast5_analysis/preprocessing/barcoding_summary.txt -o ./16s_barcode.html --quiet

ysuzuki1978 commented 1 year ago

I think the cause is that "pair_strands_flag_cpu" is not defined in the following part and therefore cannot be found, is there any countermeasure?

MinION_mobile_lab.R


if (!dir.exists(paste0(d2, "/qc"))) { dir.create(paste0(d2, "/qc")) cat(text = paste0("Creating folder: ", d2, "/qc, which is going to include stats about the sequencing run"), file = logfile, sep = "\n", append = TRUE) cat(text = paste0("Creating folder: ", d2, "/qc, which is going to include stats about the sequencing run"), sep = "\n") cat(text = "", file = logfile, sep = "\n", append = TRUE) cat(text = "", sep = "\n") cat(text = "Now performing quality control with PycoQC", file = logfile, sep = "\n", append = TRUE) cat(text = "Now performing quality control with PycoQC", sep = "\n") cat(text = "", file = logfile, sep = "\n", append = TRUE) cat(text = "", sep = "\n")

if (skip_demultiplexing_flag == 1) {
  system(paste0(PYCOQC, " -f ", d2_basecalling, "/sequencing_summary.txt -o ", d2, "/qc/pycoQC_report.html --min_pass_qual ", min_qual))
} else {
  if (pair_strands_flag_cpu == 1) {
    system(paste0(PYCOQC, " -f ", d2_basecalling, "/sequencing_summary.txt -b ", d2_preprocessing, "/barcoding_summary.txt -o ", d2, "/qc/pycoQC_report.html  --min_pass_qual ", min_qual))
  } else {
    system(paste0(PYCOQC, " -f ", d2_basecalling, "/sequencing_summary.txt -b ", d2_preprocessing, "/barcoding_summary.txt -o ", d2, "/qc/pycoQC_report.html --min_pass_qual ", min_qual))
  }
}

}

MaestSi commented 1 year ago

You are right, I forgot to remove the evaluation of the condition based on the value of pair_strands_flag_cpu parameter, which was required when using 1d^2 chemistry, a couple of years ago. After removing that portion of code (as in the updated MinION_mobile_lab.R script), you should be able to re-start the pipeline. Base-calling and demultiplexing should now be skipped, since their folder is already there. Let me know if this works, Simone

ysuzuki1978 commented 1 year ago

Thank you for updating the script. It seems to be working well, but not all the work is done yet. I checked the process and it seems to be taking a tremendous amount of time in vsearch. It has been 2 days and it is not finished.

MaestSi commented 1 year ago

Hi, yes, I confirm Vsearch usually takes quite a lot of time. Keep the faith, it will finish eventually! :) Simone

ysuzuki1978 commented 1 year ago

The calculation process seems to be finished, but some files mentioned in the tutorial are not output. It would be helpful if you could tell us about possible problems.

(base) yakuri@yakuri-desktop:~/nanopore/16S_rRNA_20221018/no_sample/20221018_1928_MN38820_FAV42892_85448306/fast5_analysis/analysis$ ls -la 合計 6350320 drwxrwxr-x 3 yakuri yakuri 4096 12月 24 14:53 . drwxrwxr-x 6 yakuri yakuri 4096 12月 22 06:25 .. -rw-rw-r-- 1 yakuri yakuri 149171632 12月 22 06:45 BC01.fasta -r--r--r-- 1 yakuri yakuri 112579279 12月 22 06:45 BC01.fastq.gz -rw-rw-r-- 1 yakuri yakuri 120337677 12月 22 06:51 BC02.fasta -r--r--r-- 1 yakuri yakuri 86698174 12月 22 06:50 BC02.fastq.gz -rw-rw-r-- 1 yakuri yakuri 135948153 12月 22 06:57 BC03.fasta -r--r--r-- 1 yakuri yakuri 102794769 12月 22 06:57 BC03.fastq.gz -rw-rw-r-- 1 yakuri yakuri 136831041 12月 22 07:05 BC04.fasta -r--r--r-- 1 yakuri yakuri 104728657 12月 22 07:05 BC04.fastq.gz -rw-rw-r-- 1 yakuri yakuri 190593076 12月 22 07:14 BC05.fasta -r--r--r-- 1 yakuri yakuri 144041279 12月 22 07:14 BC05.fastq.gz -rw-rw-r-- 1 yakuri yakuri 144612251 12月 22 07:21 BC06.fasta -r--r--r-- 1 yakuri yakuri 109281397 12月 22 07:21 BC06.fastq.gz -rw-rw-r-- 1 yakuri yakuri 161515303 12月 22 07:30 BC07.fasta -r--r--r-- 1 yakuri yakuri 123050123 12月 22 07:29 BC07.fastq.gz -rw-rw-r-- 1 yakuri yakuri 192472983 12月 22 07:38 BC08.fasta -r--r--r-- 1 yakuri yakuri 145029441 12月 22 07:38 BC08.fastq.gz -rw-rw-r-- 1 yakuri yakuri 124484543 12月 22 07:47 BC09.fasta -r--r--r-- 1 yakuri yakuri 93137488 12月 22 07:47 BC09.fastq.gz -rw-rw-r-- 1 yakuri yakuri 247517588 12月 22 07:58 BC10.fasta -r--r--r-- 1 yakuri yakuri 185358076 12月 22 07:58 BC10.fastq.gz -rw-rw-r-- 1 yakuri yakuri 170776463 12月 22 08:07 BC11.fasta -r--r--r-- 1 yakuri yakuri 130524580 12月 22 08:07 BC11.fastq.gz -rw-rw-r-- 1 yakuri yakuri 225474039 12月 22 08:17 BC12.fasta -r--r--r-- 1 yakuri yakuri 169291730 12月 22 08:17 BC12.fastq.gz drwxrwxr-x 2 yakuri yakuri 4096 12月 24 11:36 collapsed_feature_tables -rw-rw-r-- 1 yakuri yakuri 311626 12月 24 00:24 demux_summary.qzv -rw-rw-r-- 1 yakuri yakuri 5587 12月 24 11:36 logfile.txt -rw-rw-r-- 1 yakuri yakuri 1624 12月 22 09:01 manifest.txt -rw-rw-r-- 1 yakuri yakuri 436271636 12月 24 00:23 rep-seqs.qza -rw-rw-r-- 1 yakuri yakuri 957708294 12月 24 00:35 rep-seqs.qzv -rw-rw-r-- 1 yakuri yakuri 1506983139 12月 22 09:12 sequences.qza -rw-rw-r-- 1 yakuri yakuri 33832601 12月 24 00:21 table.qza -rw-rw-r-- 1 yakuri yakuri 61269245 12月 24 00:26 table.qzv


(base) yakuri@yakuri-desktop:~/nanopore/16S_rRNA_20221018/no_sample/20221018_1928_MN38820_FAV42892_85448306/fast5_analysis/analysis/collapsed_feature_tables$ ls -la 合計 8 drwxrwxr-x 2 yakuri yakuri 4096 12月 26 14:28 . drwxrwxr-x 3 yakuri yakuri 4096 12月 24 14:53 .. -rw-rw-r-- 1 yakuri yakuri 0 12月 24 11:34 feature-table_absfreq_level1_stringent.tsv -rw-rw-r-- 1 yakuri yakuri 0 12月 24 11:34 feature-table_absfreq_level2_stringent.tsv -rw-rw-r-- 1 yakuri yakuri 0 12月 24 11:34 feature-table_absfreq_level3_stringent.tsv -rw-rw-r-- 1 yakuri yakuri 0 12月 24 11:35 feature-table_absfreq_level4_stringent.tsv -rw-rw-r-- 1 yakuri yakuri 0 12月 24 11:35 feature-table_absfreq_level5_stringent.tsv

MaestSi commented 1 year ago

Hi, please check the nohup.out file and try to identify the first error you got. It seems taxonomy.qz* files were not produced. P.s.: if you want, you can share the file, after changing the extension to txt Simone

ysuzuki1978 commented 1 year ago

I too believe the problem is that taxonomy.qz* is not being output. The following commands are used to attempt output.


qiime feature-classifier classify-consensus-vsearch --p-threads 30 \ --i-query rep-seqs.qza \ --i-reference-reads /home/yakuri/nanopore/MetONTIIME/silva_132_99_16S_sequence.qza \ --i-reference-taxonomy /home/yakuri/nanopore/MetONTIIME/silva_132_99_16S_taxonomy.qza \ --o-classification taxonomy.qza \ --o-search-results vsearch.qza


nohup_out.txt

MaestSi commented 1 year ago

Hi, there does not seem to be any specific error, but for sure the command you reported failed. Can you just try rerunning the command with fewer threads? I suspect it could be a RAM memory issue. However, usually, I see the terms SIGTERM or SIGKILL in the nohup.out file when this happens, while this time there does not seem to be any of those. Edit: I just saw that '強制終了' means crash, so this could be the term suggesting the command crashed.

MaestSi commented 1 year ago

Hi, I am going to close this issue due to inactivity. In case you have any further questions, feel free to reopen it! Best, Simone