virajbdeshpande / AmpliconArchitect

AmpliconArchitect (AA) is a tool to identify one or more connected genomic regions which have simultaneous copy number amplification and elucidates the architecture of the amplicon. In the current version, AA takes as input next generation sequencing reads (paired-end Illumina reads) mapped to the hg19/GRCh37 reference sequence and one or more regions of interest. Please "watch" this repository for improvements in runtime, accuracy and annotations for GRCh38 human reference genome coming up soon.
Other
131 stars 41 forks source link

'int' object has no attribute 'chrom' at step of amplified_intervals.py #107

Open scxgbb opened 2 years ago

scxgbb commented 2 years ago

Hi,

I am running AA by using PrepareAA.py, and my command is: /scratch/xiaomingzhong/helpOther/lisui/tools/PrepareAA/PrepareAA.py -s aatest -t 8 --cnvkit_dir ~/anaconda3/envs/aa/bin/cnvkit.py --sorted_bam /scratch/xiaomingzhong/helpOther/lisui/chromothripsis/bam/PRJNA602546/SRR14137758_sort.bam

It successfully finished the cnvkit step with sort_CNV_GAIN.bed generated, but there was an error at step of amplified_intervals.py:

Wrote /scratch/xiaomingzhong/helpOther/lisui/tools/data_repo/cnvkit_output/SRR14137758_sort.cns with 539 regions Traceback (most recent call last): File "/scratch/xiaomingzhong/helpOther/lisui/tools/aa/AmpliconArchitect/src/amplified_intervals.py", line 107, in bamFileb2b = b2b.bam_to_breakpoint(bamFile, coverage_stats=cstats) File "/scratch/xiaomingzhong/helpOther/lisui/tools/aa/AmpliconArchitect/src/bam_to_breakpoint.py", line 103, in init self.median_coverage(window_list=coverage_windows) File "/scratch/xiaomingzhong/helpOther/lisui/tools/aa/AmpliconArchitect/src/bam_to_breakpoint.py", line 295, in median_coverage

Could you please provide any suggestions?

Thanks, LS

AndrewC160 commented 2 years ago

Hello LS,

A bit late but this may help others:

I was troubleshooting a very similar issue and it appears to stem from my Samtools installation: the Samtools module our server uses was throwing an error message in the script, which was then piped into amplified_intervals.py rather than displayed. The python error I was getting was the result of amplified_intervals.py trying to process that error message as input. To fix this, I installed an up-to-date version of samtools (1.14) in my home directory to make sure things are working.

If this doesn't work, you can do what I did and recreate the package's steps from the stdout messages to see if/where the various steps may fail as theoretically any error messages may do the same thing.

Hope this helps, -Andrew

scxgbb commented 2 years ago

Hi Andrew,

Thanks a lot for your suggestion! I will try it.

Best, LS On 12/31/2021 13:13,Andrew @.***> wrote:

Hello LS,

A bit late but this may help others:

I was troubleshooting a very similar issue and it appears to stem from my Samtools installation: the Samtools module our server uses was throwing an error message in the script, which was then piped into amplified_intervals.py rather than displayed. The python error I was getting was the result of amplified_intervals.py trying to process that error message as input. To fix this, I installed an up-to-date version of samtools (1.14) in my home directory to make sure things are working.

If this doesn't work, you can do why I did and recreate the package's inputs from the stdout messages to see if/where the various steps may fail as theoretically any error messages may do the same thing.

Hope this helps, -Andrew

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

acticu commented 2 years ago

Hi, I also met with this problem and got the error message below Traceback (most recent call last): File "/home/renhb/AmpliconArchitect/src/amplified_intervals.py", line 108, in bamFileb2b = b2b.bam_to_breakpoint(bamFile, coverage_stats=cstats) File "/home/renhb/AmpliconArchitect/src/bam_to_breakpoint.py", line 103, in init self.median_coverage(window_list=coverage_windows) File "/home/renhb/AmpliconArchitect/src/bam_to_breakpoint.py", line 336, in median_coverage

I checked the code there and found the refi variable equals to -1 and the debug message came to an error. Any potential solution in terms of this? Kind regard, Haobin

acticu commented 2 years ago

python2 $AA_SRC/amplified_intervals.py --bed {read_depth_folder}/output/alts.dat --out {outFileNamePrefix} --bam {BamFileName} --ref {ref} I think the problem may potentially be associated with this command.

jluebeck commented 2 years ago

Hi, please see a discussion in #113 with a similar error. Possible reasons for this include

Please let me know if issues persist though. If you can provide a) the command you ran, b) bed file for AA, c) BAM header then I should be able to help resolve. Feel free to contact at jluebeck [at] ucsd.edu.