secastel / phaser

phasing and Allele Specific Expression from RNA-seq
GNU General Public License v3.0
105 stars 36 forks source link

subprocess.CalledProcessError #53

Closed msubirana closed 4 years ago

msubirana commented 5 years ago

I got the following error while using the repo phaser.

##################################################
              Welcome to phASER v1.1.1
  Author: Stephane Castel (scastel@nygenome.org)
  Updated by: Bishwa K. Giri (bkgiri@uncg.edu)
##################################################

Completed the check of dependencies and input files availability... 

STARTED "Read backed phasing and ASE/haplotype analyses" ... 
    DATE, TIME : 2019-04-24, 17:21:25
#1. Loading heterozygous variants into intervals...
Processing sample named 10780_wgs_FromBam
    using all the chromosomes ...
    processing VCF...

    Memory efficient mode is deactivated...
    If RAM is limited, activate memory efficient mode using the flag "--process_slow = 1"...

     creating variant mapping table...
          2441858 heterozygous sites being used for phasing (0 filtered, 0 indels excluded, 2268598 unphased)

#2. Retrieving reads that overlap heterozygous sites...
     file: /imppc/labs/lplab/share/marc/epimutations/processed/bam/hg38/atacBam/10780_ATAC.bam
          minimum mapq: 255
          mapping reads to variants...
Traceback (most recent call last):
  File "/imppc/labs/lplab/share/marc/repos/phaser/phaser/call_read_variant_map.py", line 2, in <module>
    import read_variant_map;
ImportError: /imppc/labs/lplab/share/marc/repos/phaser/phaser/read_variant_map.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8
[main_samview] failed to write the SAM header
samtools view: error closing standard output: -1
samtools view: writing to standard output failed: Broken pipe
samtools view: error closing standard output: -1
Traceback (most recent call last):
  File "/imppc/labs/lplab/share/marc/repos/phaser/phaser/phaser.py", line 2358, in <module>
    main();
  File "/imppc/labs/lplab/share/marc/repos/phaser/phaser/phaser.py", line 170, in main
    parse_sample(sample_name, map_sample_column, args.bam, args.o, contig_ban)
  File "/imppc/labs/lplab/share/marc/repos/phaser/phaser/phaser.py", line 262, in parse_sample
    start_time, vcf_out, sample_out_path, last_chr=True, pi_block_value = 0)
  File "/imppc/labs/lplab/share/marc/repos/phaser/phaser/phaser.py", line 533, in process_vcf
    result_files = parallelize(call_mapping_script, pool_input);
  File "/imppc/labs/lplab/share/marc/repos/phaser/phaser/phaser.py", line 2089, in parallelize
    pool_output.append(function(input));
  File "/imppc/labs/lplab/share/marc/repos/phaser/phaser/phaser.py", line 1346, in call_mapping_script
    error_code = subprocess.check_call("set -euo pipefail && "+run_cmd, stdout=devnull, shell=True, executable='/bin/bash')
  File "/soft/general/python/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'set -euo pipefail && samtools view -h /imppc/labs/lplab/share/marc/epimutations/processed/bam/hg38/atacBam/10780_ATAC.bam 'chr1': | samtools view -Sh -F 0x400  -L /tmp/tmpnWNPVv -q 255 - | python2.7 /imppc/labs/lplab/share/marc/repos/phaser/phaser/call_read_variant_map.py --baseq 10 --splice 1 --isize_cutoff 0.0 --variant_table /tmp/tmpy1yJfS --o /tmp/tmppUwFEs' returned non-zero exit status 1

Code:

python /imppc/labs/lplab/share/marc/repos/phaser/phaser/phaser.py --vcf $vcf --bam $bam --mapq 255 --baseq 10 --sample $(bcftools query -l $vcf) --o prove --paired_end 0 --id_separator "@"

I used the id_separator "@" becuase the error:

FATAL ERROR: Character '_' must not be present in contig name. Please change id separtor using --id_separator to a character not found in the contig names and try again.

Any suggestions?

secastel commented 5 years ago

Sorry for the delayed response. Could you let me know what your contains are called (this information can be found in the BAM header)? Also, did you can you try with a different ID separator (e.g. !, :, ;, etc.)?