nanoporetech / hammerpede Goto Github PK
View Code? Open in Web Editor NEWA package for training strand-specific profile HMMs for primer sets from real Nanopore data
License: Other
A package for training strand-specific profile HMMs for primer sets from real Nanopore data
License: Other
I ran the following command:
hp_bootstrap.py -f adaptors.fa -o hammerpede_output <(gunzip -c ../qscore7.fastq.gz)
And it ran for ~20 hours and finished creating the four hits_.fasta files. However, at this point the script was killed with exit code 137. (unfortunately I lost the error messages). The script called 'spoa' was mentioned in the error messages. Is it possible to resume the process using the hits_.fasta files (and this time I can supply the command with more memory)? If so, could you tell me which script to use please
I'm running the following command:
hp_bootstrap.py -f telo-prime_adaptors.fa -o hammerpede_output <(gunzip -c ../qscore7.fastq.gz)
It progresses normally at first and takes ~24 hours to make four fasta files, called hits_*.fasta (where * is SSP, -SSP, VNP, and -VNP). It produces the following output:
0it [00:00, ?it/s]Extracting primer regions from reads in /dev/fd/63
49153803783it [17:53:00, 763494.19it/s]
Aligning primer regions using spoa: hammerpede_output/spoa_aln_hits_VNP.fasta
But is then stuck (I think) at this stage, as nothing seems to be progressing now for ~96 hours. The node that this command is running on is running a spoa job, but the spoa_aln_hits_VNP.fasta file which has been created has not been populated with any information.
I was trying to generate hmm file for future use in pychopper using the command:
hp_bootstrap.py -f /home/anshul1/scratch/seq/our_primers.fas -o $outDir $inDir/${filename}.fastq
(Input reads: 74M)
when I faced the following error:
Aligning primer regions using spoa: /home/anshul1/scratch/seq/pychopper_out5_hmm/spoa_aln_hits_REV.fasta
/bin/sh: line 1: 327333 Illegal instruction (core dumped) spoa -l 1 -r 1 /home/anshul1/scratch/seq/pychopper_out5_hmm/hits_REV.fasta > /home/anshul1/scratch/seq/pychopper_out5_hmm/spoa_aln_hits_REV.fasta
Traceback (most recent call last):
File "/home/anshul1/virtual_envs/pychopper/bin/hp_bootstrap.py", line 95, in <module>
spoa.spoa_align(qd[1], aln)
File "/home/anshul1/virtual_envs/pychopper/lib/python3.10/site-packages/hammerpede/spoa.py", line 8, in spoa_align
sp.check_call(cmd, shell=True)
File "/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/python/3.10.2/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'spoa -l 1 -r 1 /home/anshul1/scratch/seq/pychopper_out5_hmm/hits_REV.fasta > /home/anshul1/scratch/seq/pychopper_out5_hmm/spoa_aln_hits_REV.fasta' returned non-zero exit status 132.
My primers were:
$ cat /home/anshul1/scratch/seq/our_primers.fas
>REV
TCTTTCCCTACACGACGCTCTTCCGATCT
>FRW
AAGCAGTGGTATCAACGCAGAGTGAATGGG
More details:
Complete script:
$ cat pychopperHMM_script.sh
#!/bin/bash -l
#SBATCH --error=/home/anshul1/scratch/seq/%x_err_%A_%a.txt
#SBATCH --time=1-10:00:00
#SBATCH --output=/home/anshul1/scratch/seq/%x_out_%A_%a.out
#SBATCH --cpus-per-task=2
#SBATCH --job-name=HMMpychopper
#SBATCH --array=1
#SBATCH --mem-per-cpu=30G
#SBATCH --account=def-noncodo
inDir="/home/anshul1/projects/def-noncodo/anshul1/2023-12-15_seq_JURK_HEK_1"
outDir="/home/anshul1/scratch/seq/pychopper_out5_hmm"
filename="seq_run1n2"
##activating PyChopper virtualenv
module load StdEnv/2020 gcc/9.3.0 parasail python/3.10 spoa/3.4.0
source ~/virtual_envs/pychopper/bin/activate
python -c 'import parasail'
python -c 'import pychopper'
python -c 'import tqdm'
##command:
hp_bootstrap.py -f /home/anshul1/scratch/seq/our_primers.fas -o $outDir $inDir/${filename}.fastq
##pychopper -m hmm -g ${outDir}/FRW_REV.hmm -c primer_config.txt -t 46 -r $outDir/${filename}_report.pdf -S $outDir/${filename}_statistics.tsv -u $outDir/${filename}_unclassified.fastq -w $outDir/${filename}_rescued.fastq $inDir/${filename}.fastq.gz $outDir/${filename}_full_output.fastq
Complete error file:
$ cat HMMpychopper_err_29241032_1.txt
Lmod is automatically replacing "intel/2020.1.217" with "gcc/9.3.0".
Due to MODULEPATH changes, the following have been reloaded:
1) mii/1.1.2
The following have been reloaded with a version change:
1) StdEnv/2023 => StdEnv/2020
2) blis/0.9.0 => blis/0.8.1
3) flexiblas/3.3.1 => flexiblas/3.0.4
4) gcc/12.3 => gcc/9.3.0
5) gcccore/.12.3 => gcccore/.9.3.0
6) gentoo/2023 => gentoo/2020
7) libfabric/1.18.0 => libfabric/1.10.1
8) openmpi/4.1.5 => openmpi/4.0.3
9) ucx/1.14.1 => ucx/1.8.0
0%| | 0/120138152530 [00:00<?, ?it/s]Extracting primer regions from reads in /home/anshul1/projects/def-noncodo/anshul1/2023-12-15_seq_JURK_HEK_1/seq_run1n2.fastq
100%|██████████| 120138152530/120138152530 [24:13:40<00:00, 1377404.48it/s]
Aligning primer regions using spoa: /home/anshul1/scratch/seq/pychopper_out5_hmm/spoa_aln_hits_REV.fasta
/bin/sh: line 1: 327333 Illegal instruction (core dumped) spoa -l 1 -r 1 /home/anshul1/scratch/seq/pychopper_out5_hmm/hits_REV.fasta > /home/anshul1/scratch/seq/pychopper_out5_hmm/spoa_aln_hits_REV.fasta
Traceback (most recent call last):
File "/home/anshul1/virtual_envs/pychopper/bin/hp_bootstrap.py", line 95, in <module>
spoa.spoa_align(qd[1], aln)
File "/home/anshul1/virtual_envs/pychopper/lib/python3.10/site-packages/hammerpede/spoa.py", line 8, in spoa_align
sp.check_call(cmd, shell=True)
File "/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/python/3.10.2/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'spoa -l 1 -r 1 /home/anshul1/scratch/seq/pychopper_out5_hmm/hits_REV.fasta > /home/anshul1/scratch/seq/pychopper_out5_hmm/spoa_aln_hits_REV.fasta' returned non-zero exit status 132.
Output folder:
$ ls -lh
total 2.4G
-rw-rw----. 1 anshul1 anshul1 1.9G May 22 09:54 hits_-FRW.fasta
-rw-rw----. 1 anshul1 anshul1 2.1G May 22 09:54 hits_-REV.fasta
-rw-rw----. 1 anshul1 anshul1 2.0G May 22 09:54 hits_FRW.fasta
-rw-rw----. 1 anshul1 anshul1 1019M May 22 09:54 hits_REV.fasta
-rw-rw----. 1 anshul1 anshul1 0 May 22 09:54 spoa_aln_hits_REV.fasta
My virtual env & its installed packages:
$ pip list --local
Package Version
--------------- -------------------------
biopython 1.81+computecanada
contourpy 1.2.0+computecanada
cycler 0.12.1+computecanada
edlib 1.3.9+computecanada
exceptiongroup 1.2.1
fonttools 4.51.0+computecanada
Hammerpede 0.1.0
iniconfig 2.0.0+computecanada
kiwisolver 1.4.5+computecanada
matplotlib 3.7.2+computecanada
numpy 1.25.2+computecanada
packaging 24.0
pandas 2.1.1+computecanada
parasail 1.2.4+computecanada
Pillow 10.1.0+computecanada
pip 24.0+computecanada
pluggy 1.5.0+computecanada
pychopper 2.7.9
pyparsing 3.0.9+computecanada
pysam 0.22.0+computecanada
pytest 8.2.0+computecanada
python_dateutil 2.9.0.post0+computecanada
pytz 2024.1+computecanada
setuptools 69.2.0
six 1.16.0+computecanada
tomli 2.0.1+computecanada
tqdm 4.26.0
tzdata 2024.1+computecanada
wheel 0.43.0
Any help in resolving the same would be much appreciated
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.