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

--input-file-type bed expecting 9 columns #65

Open
perinom opened this issue Jan 11, 2023 · 1 comment
Open

--input-file-type bed expecting 9 columns #65

perinom opened this issue Jan 11, 2023 · 1 comment

Comments

@perinom
Copy link

perinom commented Jan 11, 2023

Hello,

I'm trying to run IDR (v IDR 2.0.4.2, latest on Conda) with a 6-columns bed file (extended peak summits from MACS2) using --input-file-type bed --rank 5 but it fails with

[...]
File "mydir/snakemake/02/.snakemake/conda/ee8bd795864fb92a3b69fa9e4029ccf7_/lib/python3.7/site-packages/idr/idr.py", line 65, in load_bed
    float(data[6]), float(data[7]), float(data[8])
IndexError: list index out of range

It seems to me IDR is trying to read a 9 column file (like a narrowPeak), and failing. Editing the .bed by adding 3 empty columns and shifting column 5 (with bed scores) to column 7 (narrowPeaks score) works, but it's not the cleanest of the workarounds.

Running IDR with the narrowPeak file from the same MACS call the summits are coming from works, while it fails with the same error with any other 6-column bed I tried.

Am I missing something?

Thanks,
Matteo

@perinom
Copy link
Author

perinom commented Jan 11, 2023

yes, indeed.

load_bed() is trying to format bed lines with namedtuple() of fixed length with which isn't flexible for bedfile format.

Peak = namedtuple(
    'Peak', ['chrm', 'strand', 'start', 'stop', 'signal', 'summit', 'signalValue', 'pValue', 'qValue'])

I'm not sure whether IDR later uses signal (which corresponds to the column index given with --rank or signalValue

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

1 participant