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

Phasing fails #187

Open
csmoreno opened this issue May 3, 2023 · 0 comments
Open

Phasing fails #187

csmoreno opened this issue May 3, 2023 · 0 comments

Comments

@csmoreno
Copy link

csmoreno commented May 3, 2023

I am trying to run a pipeline and it gets through the generation of the snps, but then the phasing fails.
I get this error:

Traceback (most recent call last):
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/bin/hatchet", line 33, in
sys.exit(load_entry_point('hatchet==1.1.1', 'console_scripts', 'hatchet')())
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/main.py", line 61, in main
globals()command
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/run.py", line 155, in main
phase_snps(
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/phase_snps.py", line 88, in main
vcfs = phaser.run(work=phaser_args, n_instances=n_instances)
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/multiprocessing.py", line 98, in run
raise result.class(f'WORK {work_i} FAILED\n\n{error_string}')
RuntimeError: WORK 2 FAILED

Traceback (most recent call last):
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/multiprocessing.py", line 32, in run
result = self.worker.work(*args)
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/phase_snps.py", line 210, in work
vcf_phased = self.run_shapeit(infile=vcf_filtered, chromosome=chromosome) # phase
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/phase_snps.py", line 358, in run_shapeit
run(
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/Supporting.py", line 189, in run
error(error_msg.format(command=command), raise_exception=True)
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/Supporting.py", line 137, in error
return log(
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/Supporting.py", line 124, in log
raise exception_class(msg)
ValueError: Phasing failed on /Users/cmoreno/hatchet-master/PCM002.hatchet.output/phase/12_filtered.vcf.gz. Please check /Users/cmoreno/hatchet-master/PCM002.hatchet.output/phase/12_shapeit.log for possible hints.

12_shapeit.log says
Phaser mode : unrecognised option '--input-vcf'
Converter mode : unrecognised option '--output-vcf'
[bgzip] No such file or directory: /Users/cmoreno/hatchet-master/PCM002.hatchet.output/phase/12_phased.vcf
[E::hts_open_format] Failed to open file "/Users/cmoreno/hatchet-master/PCM002.hatchet.output/phase/12_phased.vcf.gz" : No such file or directory
index: failed to open "/Users/cmoreno/hatchet-master/PCM002.hatchet.output/phase/12_phased.vcf.gz"

If I try to run it with phase_snps = False, I get this error:

[2023-May-03 16:00:38]# Writing the total read counts for all samples in /Users/cmoreno/hatchet-master/output/rdr/total.tsv
NO PHASING FILE FOUND at /Users/cmoreno/hatchet-master/output/phase/phased.vcf.gz. Not including phasing in binning process.
[2023-May-03 16:00:38]# Parsing and checking input arguments
Identified 22 chromosomes.

baffile: /Users/cmoreno/hatchet-master/output/baf/tumor.1bed
outfile: /Users/cmoreno/hatchet-master/output/bb/bulk.bb
sample_names: ['normal', 'PCM002P1_bwa_mem_alignments_MARKDUPS.bam', 'PCM002P3_bwa_mem_alignments_MARKDUPS.bam']
min_snp_reads: 5000
min_total_reads: 5000
use_chr: True
processes: 4
chromosomes: ['chr1', 'chr10', 'chr11', 'chr12', 'chr13', 'chr14', 'chr15', 'chr16', 'chr17', 'chr18', 'chr19', 'chr2', 'chr20', 'chr21', 'chr22', 'chr3', 'chr4', 'chr5', 'chr6', 'chr7', 'chr8', 'chr9']
array: /Users/cmoreno/hatchet-master/output/rdr
totalcounts: /Users/cmoreno/hatchet-master/output/rdr/total.tsv
phase: None
blocksize: 25000
max_snps_per_block: 10
test_alpha: 0.1
multisample: True
ref_version: hg38

Loading intermediate files for chromosome chr13
Loading intermediate files for chromosome chr1
Loading intermediate files for chromosome chr11
Loading intermediate files for chromosome chr15
Binning p arm of chromosome chr15
No SNPs found in p arm for chr15
Binning q arm of chromosome chr15
Error in chromosome chr15:
(2184, 2166)
Binning p arm of chromosome chr11
Error in chromosome chr11:
(1537, 1467)
Binning p arm of chromosome chr1
Traceback (most recent call last):
Traceback (most recent call last):
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/combine_counts.py", line 948, in run_chromosome
bins_p = adaptive_bins_arm(
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/combine_counts.py", line 270, in adaptive_bins_arm
assert len(snp_positions) == len(snp_thresholds) - 1, (
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/combine_counts.py", line 1009, in run_chromosome
bins_q = adaptive_bins_arm(
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/combine_counts.py", line 270, in adaptive_bins_arm
assert len(snp_positions) == len(snp_thresholds) - 1, (
AssertionError: (1537, 1467)
AssertionError: (2184, 2166)
Error in chromosome chr1:
(3255, 3312)
Traceback (most recent call last):
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/combine_counts.py", line 948, in run_chromosome
bins_p = adaptive_bins_arm(
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/combine_counts.py", line 270, in adaptive_bins_arm
assert len(snp_positions) == len(snp_thresholds) - 1, (
AssertionError: (3255, 3312)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/bin/hatchet", line 33, in
sys.exit(load_entry_point('hatchet==1.1.1', 'console_scripts', 'hatchet')())
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/main.py", line 61, in main
globals()command
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/run.py", line 253, in main
combine_counts(args)
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/site-packages/hatchet/utils/combine_counts.py", line 98, in main
p.map(run_chromosome_wrapper, params)
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/multiprocessing/pool.py", line 367, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/Users/cmoreno/opt/anaconda3/envs/hatchet/lib/python3.10/multiprocessing/pool.py", line 774, in get
raise self._value
AssertionError: (1537, 1467)

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

1 participant