-
Notifications
You must be signed in to change notification settings - Fork 0
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
chep_plot IndexError: string index out of range #2
Comments
Hello!
I haven't developed this in a long time, but it looks like the error comes
from some weakness in the fasta parser.
if line[0] != ">":
is the line that breaks it, so I am guessing that the fasta file is
malformed? Let me know if changing the fasta file does not correct the
problem. To future-proof this, a more robust fasta parser should be used.
…On Thu, Oct 3, 2024 at 11:56 AM Norman Warthmann ***@***.***> wrote:
Hello,
I have provided chep_pileup_to_array with a fasta file and a bam file with
illumina reads aligned to said genome fasta file. It ran fine as per
example in your README and produced chep_3D.txt. Feeding this into
chep_plot, however, again as per example, has issues. First it complained
that it wanted a -g and -o, providing this then led to the error below. I
hope you can point me in the right direction. My genome has 33 chromosomes,
labeled chr01..chr33. Thank you very much!
I am using Python 3.12.6, samplot 1.21, snakemake 8.20.5, seaborn 0.13.2,
bedtools 2.31.1, pandas 2.2.3
(chep) ***@***.***:~/chep-analysis-for-heterozygosity$ chep_plot -f chep_3D.txt -x 0 -X 200 -d \> -g genome_plus_chloroplast.fa \> -o test
Traceback (most recent call last):
File "chep_plot", line 380, in
sys.exit(main(args))
^^^^^^^^^^
File "chep_plot", line 366, in main
genome_size = get_genome_size(args["genome"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "chep_plot", line 361, in get_genome_size
if line[0] != ">":
~~~~^^^
IndexError: string index out of range
—
Reply to this email directly, view it on GitHub
<#2>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAX2QSMB3FJT3MAYOHYBCJDZZUID3AVCNFSM6AAAAABPJNWVHKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3DGNRRGMYTGMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hello Darrin, thanks for getting back. |
Hello,
I have provided chep_pileup_to_array with a fasta file and a bam file with illumina reads aligned to said genome fasta file. It ran fine as per example in your README and produced chep_3D.txt. Feeding this into chep_plot, however, again as per example, has issues. First it complained that it wanted a -g and -o, providing this then led to the error below. I hope you can point me in the right direction. My genome has 33 chromosomes, labeled chr01..chr33. Thank you very much!
I am using Python 3.12.6, samplot 1.21, snakemake 8.20.5, seaborn 0.13.2, bedtools 2.31.1, pandas 2.2.3
Traceback (most recent call last):
File "chep_plot", line 380, in
sys.exit(main(args))
^^^^^^^^^^
File "chep_plot", line 366, in main
genome_size = get_genome_size(args["genome"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "chep_plot", line 361, in get_genome_size
if line[0] != ">":
~~~~^^^
IndexError: string index out of range
The text was updated successfully, but these errors were encountered: