Skip to content
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

Open
warthmann opened this issue Oct 3, 2024 · 2 comments
Open

chep_plot IndexError: string index out of range #2

warthmann opened this issue Oct 3, 2024 · 2 comments

Comments

@warthmann
Copy link

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) norman@Workstation:~/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

@conchoecia
Copy link
Owner

conchoecia commented Oct 6, 2024 via email

@warthmann
Copy link
Author

warthmann commented Oct 6, 2024

Hello Darrin, thanks for getting back.
Funny, I am just 40 km down the road from Vienna, in Seibersdorf. I didn't notice anything funny with the fasta file, which I am using as downloaded. Can you give me a hint what to look out for? Ie, will it fail on empty lines? multi-word sequence names? or maybe the line breaks, or the wrapping? What exact format does your fasta parser expect? Note that the same fasta file worked for 'chep_pileup_to_array'. thanks a lot, best wishes, Norman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants