Script to report GC content of the island returned by SICER
2
0
Entering edit mode
6.9 years ago
Soumitra Pal ▴ 10

Hi,

I need to find the GC content of the islands returned by the SICER tool. Does anybody know about such a script? I want to reuse if it exists rather than reinvent.

Any code will be fine, however python will be preferred.

Another way to ask my question. I need to solve the following problem.

Input: 1) Genome, 2) Intervals on genome Output: Percent of GC in those intervals.

Thank you. Soumitra

SICER island GC Content • 1.4k views
ADD COMMENT
0
Entering edit mode

Thank you @EagleEye.

ADD REPLY
1
Entering edit mode
6.9 years ago

So you have a bed file containing intervals of interest and a fasta of the genome? Sounds rather trivial.

You can use bedtools getfasta to slice out the fragments of the genome you need based on the bed file. Then you have fragments for which you need to calculate the GC content.

I mashed a bit of code together from a related script to produce the following:

Takes in a fasta file, returns table of identifier, GC content and length (bonus).

Optionally you could write a script which takes the entire genome, slices out the parts you want and calculates on that.

ADD COMMENT
0
Entering edit mode

Thank you WouterDeCoster for your quick reply. I will use bedtools and your code, as you suggested. I hope the bedtools will handle 'N' in the genome file and also multiple chromosomes. Let me explore that. Thanks again.

ADD REPLY
1
Entering edit mode

I hope the bedtools will handle 'N' in the genome file and also multiple chromosomes

That should work without issues.

ADD REPLY
1
Entering edit mode

Yes, it worked without any issues. Thank you.

I also found out that 'nuc' instead of 'getfasta' from bedtools can also be used. It directly gives GC contents and other information. However, I will still use your code as it will help me do some more analysis.

ADD REPLY
1
Entering edit mode
6.9 years ago
EagleEye 7.5k

Check out this post

A: GC percent detection for several number of genes

ADD COMMENT
0
Entering edit mode

Thank you too EagleEye.

ADD REPLY

Login before adding your answer.

Traffic: 3832 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6