Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Hel
    Member
    • Jul 2013
    • 24

    Compare fasta files

    Hi there,

    I want to compare several fasta files containing sequences. These sequences are transcripts obtained from RNA-Seq. I want to find out the shared transcripts between samples.
    I cannot use CuffCompare or similar because I have no reference genome. I only have transcripts.

    Thanks in advance,
  • dschika
    Member
    • Mar 2010
    • 56

    #2
    You could try CD-HIT to cluster the reads.

    Comment

    • Richard Finney
      Senior Member
      • Feb 2009
      • 701

      #3
      Try using command line utilities
      cat
      sort
      uniq


      example :
      #get unique reads for 1, filter out read names (lines with >)
      cat 1.fa | grep -v ">" | sort | uniq > 1.tmp
      #get unique reads for 2
      cat 2.fa | grep -v ">" | sort | uniq > 2.tmp
      #get reads common to 1 and 2
      cat 1.tmp 2.tmp | sort | uniq -d


      sort takes a "more RAM memory" parameter if it's a large data files.
      check out the manual using "man sort" for details

      Comment

      • vivek_
        PhD Student
        • Jul 2012
        • 164

        #4
        BLAT appears the easiest and straightforward way right?

        Comment

        • Richard Finney
          Senior Member
          • Feb 2009
          • 701

          #5
          Check out bl2seq ...


          There's a command line version if your into that kind of stuff.

          Comment

          • Hel
            Member
            • Jul 2013
            • 24

            #6
            Thanks to all, I am very grateful for your help,

            This is my opinion:

            (i) CD-HIT seems interesting, but I have not test it yet.

            (ii) Using 'cat', 'sort' and 'uniq' commands in FASTA files performs an enormous mistake, because it compares each line instead of each sequence (composed of multiple lines).

            (iii) 'BLAT' needs a reference genome, and I do not have such.

            (iv) 'bl2seq' does not support large size files, so that they suggested to use Blast+. So it is the same as running a local blast with Blast+.

            Is this correct?

            Comment

            • GenoMax
              Senior Member
              • Feb 2008
              • 7142

              #7
              Originally posted by Hel View Post
              (iii) 'BLAT' needs a reference genome, and I do not have such.
              Blat does not need a reference genome. In fact you use blat with just two files (which can be single sequences or multi-fasta files). First file on the command line serves as the "database" and the second "query". So in your case you will be blatting a sequence (actually many of them sequentially) against one "database" file (or the whole lot of files concatenated together). Ideally the sequence itself will be the top hit. You may want to use tabular format to be able to parse the results easily.

              Comment

              • rhinoceros
                Senior Member
                • Apr 2013
                • 372

                #8
                Originally posted by Hel View Post

                (ii) Using 'cat', 'sort' and 'uniq' commands in FASTA files performs an enormous mistake, because it compares each line instead of each sequence (composed of multiple lines).
                You could remove the linebreaks in seqs and then continue as Richard advised..

                Code:
                awk '!/^>/ { printf "%s", $0; n = "\n" } /^>/ { print n $0; n = "" } END { printf "%s", n }' file.fa > out.fa
                Last edited by rhinoceros; 05-18-2015, 04:04 AM.
                savetherhino.org

                Comment

                Latest Articles

                Collapse

                • SEQadmin2
                  Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                  by SEQadmin2


                  I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                  Here are nine questions we think about, in roughly the order they matter, before...
                  06-18-2026, 07:11 AM
                • SEQadmin2
                  From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
                  by SEQadmin2


                  Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


                  The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
                  ...
                  06-02-2026, 10:05 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, 06-17-2026, 06:09 AM
                0 responses
                36 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 06-09-2026, 11:58 AM
                0 responses
                99 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 06-05-2026, 10:09 AM
                0 responses
                120 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 06-04-2026, 08:59 AM
                0 responses
                113 views
                0 reactions
                Last Post SEQadmin2  
                Working...