Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hybpiper assemble error #105

Open
dianzhiyong opened this issue Dec 13, 2022 · 5 comments
Open

hybpiper assemble error #105

dianzhiyong opened this issue Dec 13, 2022 · 5 comments

Comments

@dianzhiyong
Copy link

dear author
i have installed HybPiper , i have a problem when run this command :
hybpiper assemble -r EG30_R*_test.fastq -t_dna test_targets.fasta --prefix EG30 --bwa

and report as below :

[INFO]: Everything looks good!
[INFO]: Checking target file FASTA header formatting...
[INFO]: The target file FASTA header formatting looks good!
[INFO]: The target file contains at least one sequence for 13 unique genes.
[WARNING]: There are 1 sequences in your target file that contain unexpected stop codons
when translated in the first forwards frame. If your target file contains only
protein-coding sequences, please check these sequences, and/or run "hybpiper
fix_targetfile". Sequence names can be found in the sample log file (if running
"hybpiper assemble") or printed below (if running "hybpiper check_targetfile").

[WARNING]: There are 1 sequences in your target file that are not multiples of three. If
your target file contains only protein-coding sequences, please check these
sequences, and/or run "hybpiper fix_targetfile". Sequence names can be found in
the sample log file (if running "hybpiper assemble") or printed below (if
running "hybpiper check_targetfile").

[CMD]: bwa mem -t 104 test_targets.fasta /home/zhiy/software/HybPiper/HybPiper/
test_dataset/EG30_R1_test.fastq /home/zhiy/software/HybPiper/HybPiper/
test_dataset/EG30_R2_test.fastq | samtools view -h -b -S - > EG30.bam
[INFO]: Gathering IDs for mapped reads...
[INFO]: In total, 60996 reads from the paired-end read files will be distributed to gene directories
[NOTE]: Distributing paired reads to gene directories
Traceback (most recent call last):
File "/home/yj/anaconda3/bin/hybpiper", line 10, in
sys.exit(main())
File "/home/yj/anaconda3/lib/python3.7/site-packages/hybpiper/assemble.py", line 1775, in main
args.func(args)
File "/home/yj/anaconda3/lib/python3.7/site-packages/hybpiper/assemble.py", line 1361, in assemble
merged=args.merged, low_mem=args.distribute_low_mem, logger=logger)
File "/home/yj/anaconda3/lib/python3.7/site-packages/hybpiper/assemble.py", line 739, in distribute_bwa
low_mem=low_mem)
File "/home/yj/anaconda3/lib/python3.7/site-packages/hybpiper/distribute_reads_to_targets.py", line 327, in distribute_reads
min_poll_interval=30, widgets=widgets):
TypeError: 'module' object is not callable

can you give me some advice to solve this problem ? thank you !

                                                                        dianzhiyong
@chrisjackson-pellicle
Copy link
Collaborator

Hi @dianzhiyong,

I suspect this is an issue with the conda environment in which you installed HybPiper.

Looking at your error message, it appears that you installed HybPiper in your base conda environment, rather than creating a new environment for HybPiper as recommended here.

The error you're seeing is occurring when the HybPiper module distribute_reads_to_targets.py calls the external module progressbar2. Somewhat confusingly, the statement to initially import the progressbar2 module is import progressbar, which is the same statement required for the module progressbar (an older module from which progressbar2 was developed). I suspect your conda base environment has this older module installed.

Can you try installing HybPiper in a new conda environment?

Cheers,

Chris

@dianzhiyong
Copy link
Author

thank you,my dear Chris
the hybpiper was installed by this command : "pip install . " with your help , progressbar2 modoule was installed manually , and " hybpiper assemble " can run successfully
best wishs
dianzhiyong

@dianzhiyong
Copy link
Author

dear Chris,
I can't install the tools by conda in my workstation . so i have to use the pip installed . I encounter another problem when run " hybpiper stats -t_dna test_targets.fasta gene namelist.txt " ,report as :

[INFO]: HybPiper was called with these arguments:
stats -t_dna test_targets.fasta gene namelist.txt

[INFO]: A sequence length table has been written to file: seq_lengths.tsv
Traceback (most recent call last):
File "/home/yj/anaconda3/bin/hybpiper", line 10, in
sys.exit(main())
File "/home/yj/anaconda3/lib/python3.7/site-packages/hybpiper/assemble.py", line 1775, in main
args.func(args)
File "/home/yj/anaconda3/lib/python3.7/site-packages/hybpiper/assemble.py", line 1540, in hybpiper_stats_main
hybpiper_stats.main(args)
File "/home/yj/anaconda3/lib/python3.7/site-packages/hybpiper/hybpiper_stats.py", line 399, in main
stats_dict[name] += enrich_efficiency_bwa(bamfile)
File "/home/yj/anaconda3/lib/python3.7/site-packages/hybpiper/hybpiper_stats.py", line 241, in enrich_efficiency_bwa
pctMapped = 100 * mappedReads / numReads
UnboundLocalError: local variable 'mappedReads' referenced before assignment

can you give me some advice

@chrisjackson-pellicle
Copy link
Collaborator

Hi @dianzhiyong,

What version of samtools do you have installed? As noted in here, it should be >= 1.14.

@agitto1
Copy link

agitto1 commented Mar 23, 2023

I'm having an issue with hybpiper stopping at the:

bwa mem -t 64 PpalPmegtarget_og_clean.fasta /blue/jeremybrawner/agitto/agitto1/
captureseqworking_all1/2b_fastq_namechange/PH066_R1.fastq /blue/jeremybrawner/
agitto/agitto1/captureseqworking_all1/2b_fastq_namechange/PH066_R2.fastq |
samtools view -h -b -S - > PH066.bam
[INFO]: Gathering IDs for mapped reads...
[INFO]: In total, 51797876 reads from the paired-end read files will be distributed to gene directories
[NOTE]: Distributing paired reads to gene directories
Elapsed Time: 0:00:30|############################## |ETA: 0:01:17Killed

In the log it stops at:
[main] Version: 0.7.17-r1188
[main] CMD: bwa mem -t 64 PpalPmegtarget_og_clean.fasta /blue/jeremybrawner/agitto/agitto1/captureseqworking_all1/2b_fastq_namechange/PH066_R1.fastq /blue/jeremybrawner/agitto/agitto1/captureseqworking_all1/2b_fastq_namechange/PH066_R2.fastq
[main] Real time: 1014.986 sec; CPU: 4505.927 sec

2023-03-22 20:59:38,037 - assemble.py - hybpiper.assemble - assemble - DEBUG - bamfile is: PH066.bam
2023-03-22 20:59:38,038 - distribute_reads_to_targets.py - hybpiper.assemble.hybpiper.distribute_reads_to_targets - read_sorting_bwa - INFO - [INFO]: Gathering IDs for mapped reads...
2023-03-22 21:01:05,207 - assemble.py - hybpiper.assemble - distribute_bwa - INFO - [INFO]: In total, 51797876 reads from the paired-end read files will be distributed to gene directories
2023-03-22 21:01:14,362 - distribute_reads_to_targets.py - hybpiper.assemble.hybpiper.distribute_reads_to_targets - distribute_reads - INFO - [NOTE]: Distributing paired reads to gene directories

Will check out the progressbar2 issue.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants