etal / cnvkit

Copy number variant detection from targeted DNA sequencing
http://cnvkit.readthedocs.org
Other
520 stars 163 forks source link

CNVkit batch command cannot recognise bed file format #696

Closed HasibAhmed1996 closed 2 years ago

HasibAhmed1996 commented 2 years ago

I'm currently doing my master's thesis on WES analysis and I need help regarding CNVkit. I've followed the documentation of CNVkit website and have also downloaded BED files from Agilent sureselect website. For some reason, cnvkit.py batch ....... always returns with "BED file in incorrect format" when it literally is a .bed file. I don't know how to get around this problem. Please help. I am attaching photos of the command I wrote, the error message and also first few lines of my bed file. IMG_20220222_183721__01 IMG_20220222_183802__01 IMG_20220222_183904__01__01

tetedange13 commented 2 years ago

Hi @HasibAhmed1996,

Try to create a 2nd BED file without any header (first 2 lines starting by "browser" and "track") => Something like that: awk 'NR>2' S31285117_Regions.bed > S31285117_Regions-NOhead.bed => Then re-run your batch command with this BED instead and tell us

Also for your future issues, please avoid reporting your outputs and command-lines as pictures (as they are way heavier) => Better use simple text with with dedicated Markdown syntax! See: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting => Anyway, thanks for providing details !

Hope this helps. Have a nice day. Felix.

tetedange13 commented 2 years ago

Notes for possible enhancement:

Instead of trying to cover every case, maybe simply specify somewhere in CNVkit documentation that BED files should not have a header ? => Actually this is mostly true for all files given as input to CNVkit (thinking at #618 )

Felix.

etal commented 2 years ago

Thanks, Felix. Since most Agilent BED files include both these header lines and I think they are valid UCSC BED features, I'm inclined to check for both possibilities in the same if statement as you suggested.

HasibAhmed1996 commented 2 years ago

Thank you so much, Felix. Removing the first 2 lines from the bed file worked perfectly!