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 42 forks source link

os.path.abspath(bamfile_pathname): IndexError: list index out of range #135

Open jingydz opened 1 year ago

jingydz commented 1 year ago

Command

python3 PrepareAA.py -s R18008004LD01-A130017-1 -t 4 --cnvkit_dir /xxxj/software/cnvkit/cnvkit.py --bam R18008004LD01-A130017-1.bam --ref GRCh38 -o R18008004LD01-A130017-1_AA_OUT_10x.expand2.30x --run_AA --run_AC

Log file

Wrote R18008004LD01-A130017-1_AA_OUT_10x.expand2.30x/R18008004LD01-A130017-1_cnvkit_output/R18008004LD01-A130017-1.cns with 382 regions Global ref name is GRCh38 Traceback (most recent call last): File "/parastor300/work01/zhangjj/software/AmpliconArchitect/src/amplified_intervals.py", line 117, in if ll[0] == os.path.abspath(bamfile_pathname): IndexError: list index out of range amplified_intervals.py returned a non-zero exit code. Exiting... 2023-05-07 15:56:41.870414 PrepareAA version 0.1344.4

Matched R18008004LD01-A130017-1.bam to reference genome GRCh38 Running PrepareAA on sample: R18008004LD01-A130017-1 R18008004LD01-A130017-1.bam index not found, calling samtools index Finished indexing R18008004LD01-A130017-1.bam: 772430862 + 0 properly paired (98.27% : N/A)

Question

Is this because my filename is too long? Should I change the source code in /xxx/AmpliconArchitect/src/amplified_intervals?

jluebeck commented 1 year ago

This is caused by the coverage.stats file having a blank line somewhere. This bug is fixed in newer versions of AA (see the jluebeck fork which is pending merging into Viraj's Github).

If you do not want to use the jluebeck fork, you can delete the coverage.stats file from the AA data repo and create a new, empty file called coverage.stats in that directory.

Thanks, Jens

jingydz commented 1 year ago

Thank you for your reply, I delete/XXX/software/AmpliconArchitect/AA_DATA_REPO under coverage. The stats in the file after blank lines, it did run successfully, but after running several files, The coverage.stats file has a blank line, causing some files to fail to run again. Are all the samples appearing in coverage.stats successfully run?

jluebeck commented 1 year ago

Hi,

Thanks for reporting this issue. Which fork and version of AA are you using? Would you be able to send me the coverage.stats file in question? I am happy to take a look at it to see if there are formatting issues. You can post it here or email it to me at jluebeck [at ] ucsd. edu

Thanks, Jens