help converting files

I am trying to convert a 5 column bed file to a four column bedgraph file that I then can convert to BigWig.

Here are the original file columns
chr1 3389605 3390648 MACS_peak_1 122.27

I used CUT to remove column 4, MACS_peak_1, and have added text to the revised file designating it as a begraph file.
Here is an example of my edit:

track type=bedGraph name=“BedGraph Format” description=“BedGraph format”
chr1 3389258 3390702 121.63

I must be doing something wrong as Galaxy’s BedGraph to BigWig conversion tool does not allow me to select this file for conversion. Can someone please make a suggestion.

Thank you,
Scott

1 Like

You need to change the output format of the final text manipulation tool. If you are doing this manually then simply edit the dataset metadata and change the format. If you are doing this in a workflow, go to the last tool before the conversion tool and change in the output settings to set the output format to the required format.

1 Like

Thank you for your suggestion. After using CUT to remove the MACS_peak column, I downloaded the file from Galaxy. I use EM editor to manually add this text to the top of the file:

track type=bedGraph name="BedGraph Format" description="BedGraph format" visibility=full color=200,100,0 altColor=0,100,200 priority=20

Can you tell me how to edit the dataset metadata so that Galaxy recognizes it as a Bedgraph file? Sorry for the basic lack of knowledge but I am a biologist and just trying to get up to speed on this.

1 Like

If you are uploading the file, the upload tool provides a drop down allowing you to specify the format.
Otherwise, click the pencil button for the dataset in your history view. Then go to the “change format” tab.

1 Like

thank you for your help.

Some FAQs that may help:

Be aware that you might need to remove the header line that you added. Strict bedgraph format for use with conversion tools usually does not include a track line. Track lines inform the UCSC Genome Browser about how to display data. And what you plan to display is the bigWig (?).