Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #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


    • #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


      • #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


        • #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


          • #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

            • seqadmin
              Current Approaches to Protein Sequencing
              by seqadmin


              Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
              04-04-2024, 04:25 PM
            • seqadmin
              Strategies for Sequencing Challenging Samples
              by seqadmin


              Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
              03-22-2024, 06:39 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 04-11-2024, 12:08 PM
            0 responses
            25 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 10:19 PM
            0 responses
            27 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 09:21 AM
            0 responses
            24 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-04-2024, 09:00 AM
            0 responses
            52 views
            0 likes
            Last Post seqadmin  
            Working...
            X