Hi all,
After scanning my FastA file for motifs MEME had outputted a txt file --> I now need this in bigwig format in order to analyze regions in IGV. How can I convert a text file to a bigwig file?
Any help is appreciated!
Hi all,
After scanning my FastA file for motifs MEME had outputted a txt file --> I now need this in bigwig format in order to analyze regions in IGV. How can I convert a text file to a bigwig file?
Any help is appreciated!
Hi Tanni93,
Most likely you will need to do some custom scripting in your preferred language (python..?)... Like jotan1982 mentioned you should post head
of the file you are trying to make your wiggle file from, this may help us to provide you with more specific answer. I personally don't know of any tools that convert any text files into wiggle file.
Don't get confused about bigWig and wig files. What you want is to convert your text file into wiggle file (.wig). Here is specification on how wiggle file should look like http://genome.ucsc.edu/goldenpath/help/wiggle.html. Wiggle file is just flat text file that follows some specifications. You then will need to download wigToBigWig
tool that will convert your wiggle file into binary version - bigWig file. Here https://genome.ucsc.edu/goldenpath/help/bigWig.html you can find more information on how to make bigWig from wig and also a link to directory to where you can download wigToBigWig
tool.
A note aside; I have fairly recently played around with wiggle files and IGV and as far as I can tell IGV didn't handle my wiggle file with two separate track, i.e track for forward reads and track for reverse reads all in one file..IGV would only display the last track in the file, whereas UCSC browser displayed both track no problem. I didn't try to convert to bigWig. (yes thats another point that I just realised IGV can handle wiggle file fine).
Its rather had to tell what format you should use, since very little information is provided about your file, but maybe different file format might be more appropriate e.g bed format, should also be handled by IGV.
Cheers,
Kirill
As Kirill mentioned, BED
format is a better option. Here is my Python
script which does the BED
conversion for you. Note that this script is for demonstration purpose and you need to change the code a bit to get your desired output. Also note that part of your data is missing, however, you can also concatenate them together and for instance put them on the 4th column of your result file.
fin = open('my_orig_file.txt', 'r')
fout = open('my_bed_file.bed', 'w')
next(fin)
for l in fin:
cols = l.strip().split('\t')
fout.write('%s\t%s\t%s\t%s\t%s\t%s\n' %(cols[0], cols[2], cols[3], cols[1], cols[5], cols[4]))
fin.close()
fout.close()
Assumptions:
.split('\t')
. You can change it accordingly. This is how one of the rows will look like in the IGV
:
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
What does your text file look like? Could you paste a short example?
sample lines:
sample lines:
to me wiggle file wouldn't be a good options, from what I understand wiggle file is good for representing something at a given genomic position, although position can span multiple bases.. I'm pretty sure you'll be better off investigating bed format and trying to convert your text file into bed, which also has bigBed - binary version. I believe IGV and other viewers accept those formats. In fact your file is essentially bed file, all you need to do is to chop last few columns out. You might want to keep score values in. For more look here https://genome.ucsc.edu/FAQ/FAQformat.html#format1
Hi all,
I am new to these kind of analysis and appreciate any guidance on my issue here: I have analyzed peakcalling .txt files that are ready for plotting and visualization and I want to use deeptools with linux command line for meta-profile heatmaps and other possible tools here, since my files are all .txt and contain all peak information with 19 columns as below:
can somebody help me with the common steps and workflow to convert .txt file to bed and bigwig files to do further analysis like DE and also visualize by using the deeptools?
I really appreciate any guidance.
Best Sogand
Please stop asking questions in existing threads. Delete these two comments and open a new question with all the necessary details to understand your data and elaborate what you need.
Hi, I tried to delete my comment but can't see any delete/remove option here!
Thanks
Click on
edit
. That should open the edit window which will have aDelete
button at bottom right to delete the comment/reply.