kundajelab/chrombpnet

Error while shifting ATAC reads; similar to issue #153

viramalingam opened this issue · 6 comments

Hi all,
I am also getting an error with shifting the reads similar to issue #153 . Alignment was done using chromap with no shift.

Thanks,
Vivek

chrombpnet bias pipeline \
>         -itag /mnt/lab_data2/vir/random/chrombpnet_rando_org/acoel/hf_6h_post_rep1/SCFE01_ref/chrombpnet/data/aln_noshift.bed\
>         -d "ATAC" \
>         -g /mnt/lab_data2/vir/random/chrombpnet_rando_org/references/SCFE01/SCFE01.fsa_nt \
>         -c /mnt/lab_data2/vir/random/chrombpnet_rando_org/references/SCFE01/chroms.sizes \
>         -p chrombpnet/data/peaks_chromap_fragments_MACS_q01_peaks.narrowPeak\
>         -n chrombpnet/data/output_auxillary/negatives.bed \
>         -fl /mnt/lab_data2/vir/random/chrombpnet_rando_org/references/SCFE01/fold_0.json \
>         -b 0.5 \
>         -o chrombpnet/bias_model/ \
>         -fp hf_6h_post_rep1
Estimating enzyme shift in input file
Traceback (most recent call last):
  File "/users/vir/anaconda3/envs/chrombpnet/bin/chrombpnet", line 8, in <module>
    sys.exit(main())
  File "/users/vir/anaconda3/envs/chrombpnet/lib/python3.8/site-packages/chrombpnet/CHROMBPNET.py", line 38, in main
    pipelines.train_bias_pipeline(args)
  File "/users/vir/anaconda3/envs/chrombpnet/lib/python3.8/site-packages/chrombpnet/pipelines.py", line 278, in train_bias_pipeline
    reads_to_bigwig.main(args)
  File "/users/vir/anaconda3/envs/chrombpnet/lib/python3.8/site-packages/chrombpnet/helpers/preprocessing/reads_to_bigwig.py", line 96, in main
    plus_shift, minus_shift = auto_shift_detect.compute_shift(args.input_bam_file,
  File "/users/vir/anaconda3/envs/chrombpnet/lib/python3.8/site-packages/chrombpnet/helpers/preprocessing/auto_shift_detect.py", line 232, in compute_shift
    plus_shift, minus_shift = compute_shift_ATAC(ref_plus_pwms, ref_minus_pwms, plus_pwm, minus_pwm)
  File "/users/vir/anaconda3/envs/chrombpnet/lib/python3.8/site-packages/chrombpnet/helpers/preprocessing/auto_shift_detect.py", line 188, in compute_shift_ATAC
    raise ValueError("Input file shifts inconsistent. Please post an issue")
ValueError: Input file shifts inconsistent. Please post an issue

Hey Vivek,

In issue #153 I think they figured that there is some problem with their usage (bam and bed are from different genomic versions). Can you cross check that you are not facing the same problem or any other inconsistencies?

Also what are defined as summits in your peak file?

(1) Can you run the scripts mentioned in the issue above and share the .pngs that are generated as a part of the output ?
(2) Did you try to do any kind of shifts on your input?

I do not have bam files. Just the tagalign files from chromap. I run the alignment with the no shift option.

For documentation - The reason @viramalingam encountered this error is because his dataset showed a Tn5 motif representation that is more AT-rich and differs from the common reference used in the repository. As a solution, he manually provided shifts to execute the pipeline after building the PWM images from the bigwig and verifying there are no pre-defined shifts in his input.

image

I am closing this @viramalingam as resolved. Feel free to re-open it if you see any more issues.