Unconfigured Ad

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

    #1

    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
              Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
              by SEQadmin2



              Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

              Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
              ...
              Yesterday, 09:55 AM
            • SEQadmin2
              New Genomics Technologies Take Aim at Long-Standing Limits
              by SEQadmin2


              Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

              We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
              ...
              09-28-2026, 10:25 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, Today, 10:52 AM
            0 responses
            8 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, Yesterday, 05:39 AM
            0 responses
            15 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-13-2026, 09:56 AM
            0 responses
            15 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-09-2026, 11:14 AM
            0 responses
            27 views
            0 reactions
            Last Post SEQadmin2  
            Working...