daler / pybedtools

Python wrapper -- and more -- for BEDTools (bioinformatics tools for "genome arithmetic")
http://daler.github.io/pybedtools
Other
297 stars 103 forks source link

Customized header #364

Closed mike-molnar closed 2 years ago

mike-molnar commented 2 years ago

Hi, I am using each() to process some of my data, and then I use extend_fields() to store the results. I would like to add a customized header with the saveas() function, since I have changed the order of the output from the original BED files. I didn't see any way of including a customized header with saveas(), is there another way to save the output with a customized header?

Thanks, Mike

daler commented 2 years ago

Can you clarify what you mean by customized header? BedTool.saveas() does have a trackline argument to support directly uploading to the UCSC Genome Browser, but I'm not otherwise aware of headers for BED files.

mike-molnar commented 2 years ago

I was going to make parts of my workflow adjustable, depending in the user input/settings. I was trying to find a way to print the column names in the proper order, depending on the selected output. I have decided to scrap that idea and have more of a streamlined process. The trackline option will work for the way I have it set now.

Thanks Ryan