$ twoBitToFa http://hgdownload.cse.ucsc.edu/goldenPath/hg38/bigZips/hg38.2bit:chr7:2772575-2921534 stdout \ | faCount stdin #seq len A C G T N cpg chr7:2772575-2921534 148959 39330 36751 35593 37285 0 2899 total 148959 39330 36751 35593 37285 0 2899 $ bc -q scale+=3 100*(36751+35593)/148959 48.566
--
Hi Keyvan,
Thank you for your question about calculating the GC content of a gene.
If you are using a Mac or Linux operating system, you can download the twoBitToFa and
faCount utilities from the following directory:
http://hgdownload.soe.ucsc.edu/admin/exe/
Just select the operating system you are using and find the links for twoBitToFa
and faCount. If you are unsure as to your operating system, you can typeuname -a
on a command prompt.
Once you have downloaded the utilities, you must then make them executable before you
can run them:
1. On a terminal, cd to where you downloaded the utils. If you are on a Mac,
this is most likely ~/Downloads.
2. Enter the following commands to make the utils executable:chmod +x twoBitToFa
chmod +x faCount
Now you are ready to run the commands Luvina mentioned previously:./twoBitToFa http://hgdownload.cse.ucsc.edu/goldenPath/hg38/bigZips/hg38.2bit:chr7:2772575-2921534 stdout | ./faCount stdin
You can now calculate a GC% using the output from the previous command. Again
from a terminal, type the following:bc -q
scale+=3
100*((number of G's output by previous step)+(number of C's output by previous step))/(total nucleotides from previous step)
You should now have a GC percentage.
Thank you again for your inquiry and using the UCSC Genome Browser. If you have any
further questions, please reply to gen...@soe.ucsc.edu. All messages sent to that address
are archived on a publicly-accessible forum. If your question includes sensitive data, you
may send it instead to genom...@soe.ucsc.edu.
Christopher Lee
UCSC Genomics Institute
--
---
You received this message because you are subscribed to the Google Groups "UCSC Genome Browser discussion list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genome+un...@soe.ucsc.edu.