1
$\begingroup$

A BigWig file for something like Chip-seq, or ATAC data has the following format for each line i:

chrom_i - start_i - end_i - value_i

enter image description here

I need to convert for each line the (start_i -> end_i) reference to the actual DNA sequence 'ATATCCTAG...' so that at the end I have a list of DNA sequences like 'ATATCCTAG...' and the Chip-seq activity value associated with that sequence segment. What are the ways to do this? For example, what tool(s) can I use to generate the (sequence, value) pairs from browser tracks for the Chip-seq or ATAC etc. And in fact, going from BigWig browser track files for Chip-seq the most direct way to produce this kind of (seq,value) data? Thank you.

$\endgroup$

2 Answers 2

1
$\begingroup$

[Here is the link.][1]. Instructions are very clear at the website
[1]: https://bedtools.readthedocs.io/en/latest/content/tools/getfasta.html

$\endgroup$
5
  • $\begingroup$ Ah, perfect @Supertech! Thank you, both answers helpful... the link included here is the exact answer I was looking for: bedtools getfasta converts index range start_index-end_index into it's equivalent sequence of nucleotides indicated in the input *.fa file. I just need to figure out how to create the "fa" file for an entire genome like mm10, where it's usually in chromosomal chunks (i.e. Chr2.fa). $\endgroup$
    – Zebra Fish
    Jul 20, 2022 at 2:46
  • $\begingroup$ I believe each chromosome is independently numbered. If you want to generate a single genome file with all the chromosomes, download individual chromosomes and simply concatenate them. For example using Linux command "cat". >cat chr1.fa chr2.fa ... $\endgroup$
    – Supertech
    Jul 20, 2022 at 3:04
  • 1
    $\begingroup$ It looks like they may have single file. I have not downloaded to check it though. It has been long that I did not work with mouse genome. hgdownload.cse.ucsc.edu/goldenpath/mm10/bigZips $\endgroup$
    – Supertech
    Jul 20, 2022 at 3:06
  • $\begingroup$ Yes, I am trying to think why/how that would work: I guess the *.fa file has the chrX indicator at each line which would be matched along with the index (I assume a complete index needs to include chromosome number as well)! Thank you again. $\endgroup$
    – Zebra Fish
    Jul 20, 2022 at 5:51
  • 1
    $\begingroup$ Try samtools faidx. Check bedtools manual. bedtools.readthedocs.io/en/latest/content/general-usage.html $\endgroup$
    – Supertech
    Jul 20, 2022 at 10:05
1
$\begingroup$

Bedtools can take a list of coordinates and a fasta and return a multifasta of the specified regions.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.