Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • genefinder
    Junior Member
    • Mar 2010
    • 4

    Analysis of base composition of a sequence

    Dear member,

    I have a simple question.

    Could anyone suggest me a software (free ware) which gives me base composition of a sequence i.e (%A, %T, %G and %C)? My gene sequences are 8.5 kb and less.

    Thanks for the help!
  • Heisman
    Senior Member
    • Dec 2010
    • 534

    #2
    If you google you may find this link: http://unix.stackexchange.com/questi...r-in-each-line

    Here's a bash script that will work. Run it as ./script input_sequence:

    Code:
    #! /bin/bash
    input=$1
    A_total=`sed 's/[^A]//g' $input | awk '{ print length }'`
    C_total=`sed 's/[^C]//g' $input | awk '{ print length }'`
    G_total=`sed 's/[^G]//g' $input | awk '{ print length }'`
    T_total=`sed 's/[^T]//g' $input | awk '{ print length }'`
    Total=$(( $A_total + $C_total + $G_total + $T_total ))
    A_percent=`echo "scale=3; $A_total / $Total" | bc`
    C_percent=`echo "scale=3; $C_total / $Total" | bc`
    G_percent=`echo "scale=3; $G_total / $Total" | bc`
    T_percent=`echo "scale=3; $T_total / $Total" | bc`
    echo A% = "$A_percent"
    echo C% = "$C_percent"
    echo G% = "$G_percent"
    echo T% = "$T_percent"

    Comment

    • genefinder
      Junior Member
      • Mar 2010
      • 4

      #3
      Hi Heisman,

      Thank you for the reply.

      Isn't there any freeware where we can just input the sequence in fasta or any other format and it gives a summary of A, T, G and Cs?

      I am really weak in script writing.

      Comment

      • dariober
        Senior Member
        • May 2010
        • 311

        #4
        Originally posted by genefinder View Post
        Isn't there any freeware where we can just input the sequence in fasta or any other format and it gives a summary of A, T, G and Cs?
        I think bedtools nuc in the bedtools suite might do what you want:

        Code:
        bedtools nuc -fi myfasta.fa -bed mybed.bed
        The output will have counts of A,C,T,G and other stats for each interval in the bed file. Put in the bed file the start position (0) and end position of your fasta sequence/genome to summarize the entire sequence.

        Good luck
        Dario

        Comment

        • rhinoceros
          Senior Member
          • Apr 2013
          • 372

          #5
          Originally posted by genefinder View Post
          Hi Heisman,

          Thank you for the reply.

          Isn't there any freeware where we can just input the sequence in fasta or any other format and it gives a summary of A, T, G and Cs?

          I am really weak in script writing.
          That's exactly what Heisman gave you. If you want something with a GUI, you could open your sequence in for example Artemis and check the stats there..
          savetherhino.org

          Comment

          • westerman
            Rick Westerman
            • Jun 2008
            • 1104

            #6
            Try one of the EMBOSS servers (http://emboss.sourceforge.net/servers/#portals) or the public Galaxy. Those should be GUI-based. Heck we even have one here at Purdue although it is hosted from one of our smaller computers and won't be suitable for large projects.

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
              by SEQadmin2


              Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

              The systematic characterization of the human proteome has
              ...
              Today, 11:48 AM
            • SEQadmin2
              Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
              by SEQadmin2



              Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
              ...
              07-09-2026, 11:10 AM
            • SEQadmin2
              Cancer Drug Resistance: The Lingering Barrier to Rising Survival
              by SEQadmin2



              Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

              There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
              07-08-2026, 05:17 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, Today, 11:10 AM
            0 responses
            8 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-13-2026, 10:26 AM
            0 responses
            30 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-09-2026, 10:04 AM
            0 responses
            39 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-08-2026, 10:08 AM
            0 responses
            25 views
            0 reactions
            Last Post SEQadmin2  
            Working...