Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • uloeber
    Member
    • Mar 2013
    • 44

    #1

    PacBio reads: dissect variants by phylogenetic distance

    Hi all,
    I have the following problem. I have a set of PacBio reads, already filtered and known to cover a specific region of interest.
    I'd like to see whether there are clusters of variants in this dataset. I tried to use TribeMCL to dissect them based on sequence similarity. However, even with the finest granularity it creates only one cluster.
    So I performed a multiple sequence alignment using clustalw2 and created corresponding NJ trees. From the trees it looks like we have three different variants. Is there any possibility to parse the newick tree and dissect the IDs on a specific node level? I mean the sequences (IDs) are my leaves.
    It would be enough to say... "at the third branching level, put every ID from branch1 into file 1, branch 2 into file 2..." The reextraction of the sequences based on the IDs and so on to create a new fasta file and building a multiple sequence alignment on them to get a consensus is easy. I'm mainly into perl. I read the manual of Bio::Phylo, but to be honest, I couldn't find any helpful subroutine.

    First: What do you think about this idea of creating variant consensus sequences...?
    Second: Is anybody aware of a newick or similar tree parser to get what I need?

    Thanks in advance!
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    Out of curiosity .. Did you use fasta format reads to build the trees? What is the length distribution of the reads (specially within a clade)? If the reads are varying length how are you planning to generate a consensus.

    Comment

    • uloeber
      Member
      • Mar 2013
      • 44

      #3
      Yes, fasta format. It varies from 1500 bp -3000 bp. Two approaches, one: creating a multiple sequence alignment with fixed length, two: taking the longest sequence as seed.

      Comment

      • Brian Bushnell
        Super Moderator
        • Jan 2014
        • 2709

        #4
        Are these metagenomic 16S reads? And are they CCS (self-corrected)?

        Comment

        • GenoMax
          Senior Member
          • Feb 2008
          • 7142

          #5
          I am not certain if the first approach (MSA with fixed length) will work. Especially considering the variable length of the sequences. Proof is in the pudding so may be worth trying. Did you rename the sequences (because I would have thought clustal would not like the long sequence identifiers from pacbio)?

          I wonder if you can use any of the iso-Seq clustering tools built into SMRTportal.

          Here is a thread to parse labels from newick trees. From there you should be able to use faSomeRecords (from Kent utilities) to extract the sequences.

          Comment

          • uloeber
            Member
            • Mar 2013
            • 44

            #6
            @ Brian,
            they are self-corrected and no, no metagenomics, no 16S reads -> inverse PCR reads one organism.

            @ GenoMax,
            clustal had no problems with the long names. I'm done with everything, the alignment, the tree building. I just need some tree parser which extracts all leaves originated from a specified node.

            Comment

            • Brian Bushnell
              Super Moderator
              • Jan 2014
              • 2709

              #7
              I have had good success clustering self-corrected PacBio 16s reads using Dedupe (part of the BBMap package) with these commands:

              reformat.sh in=reads_of_insert.fastq out=filtered.fq minlen=1420 maxlen=1640 maq=20 qin=33

              dedupe.sh in=filtered.fq csf=stats_e26.txt outbest=best_e26.fq qin=33 -Xmx30g am=f ac=f fo c mcs=3 k=27 mo=1420 ow unpigz cc pto nam=4 e=26 pattern=cluster_%.fq dot=graph.dot


              However, those are for sequences around 1500bp long. The settings would need to be changed for longer sequences (particularly "maxlen=1640" in the reformat step, and probably "maq=20" which removes sequences with over 1% average expected error rate, and "e=26" in dedupe which allows an edit distance of 26, if your longer reads have substantially more errors than that).

              What this does is to make clusters based on transitive reachability by overlaps. So if A overlaps B by at least 1420bp and at most 26 edits, and B overlaps C with those same criteria, then A, B, and C would be in the same cluster. The reformat phase is to remove low-quality reads and chimeras.

              Anyway, you might try that if the traditional approaches don't work.

              Comment

              • uloeber
                Member
                • Mar 2013
                • 44

                #8
                I'll give it a try! bbmap was already so useful for other tasks. thanks for developing this tool!

                Comment

                • uloeber
                  Member
                  • Mar 2013
                  • 44

                  #9
                  Is it possible to do the clustering with fasta files? I lost the quality information a few steps before...

                  Comment

                  • GenoMax
                    Senior Member
                    • Feb 2008
                    • 7142

                    #10
                    Since you have read identifiers why not go back to the original file and pull those reads out in fastq format?

                    Otherwise, you can probably start with your original data file (which is what @Brian is probably referring to in the example above).

                    Comment

                    • uloeber
                      Member
                      • Mar 2013
                      • 44

                      #11
                      I do not use the full dataset at this step. Yes, then I have to recover

                      Comment

                      • colindaven
                        Senior Member
                        • Oct 2008
                        • 417

                        #12
                        You probably know this, but a great alternative for clustering fasta sequences is cd-hit or cd-hit-est

                        Comment

                        • uloeber
                          Member
                          • Mar 2013
                          • 44

                          #13
                          Why do you think it will work better than TribeMCL? Just giving it a try?

                          Comment

                          • Brian Bushnell
                            Super Moderator
                            • Jan 2014
                            • 2709

                            #14
                            Originally posted by uloeber View Post
                            Is it possible to do the clustering with fasta files? I lost the quality information a few steps before...
                            You can, you just won't be able to filter out the low-quality sequences.

                            Comment

                            Latest Articles

                            Collapse

                            • SEQadmin2
                              Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                              by SEQadmin2



                              CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                              Despite this, “CRISPR helped turn genome editing from a specialized technique into
                              ...
                              07-31-2026, 11:01 AM
                            • 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
                              ...
                              07-20-2026, 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

                            ad_right_rmr

                            Collapse

                            News

                            Collapse

                            Topics Statistics Last Post
                            Started by SEQadmin2, 08-03-2026, 10:13 AM
                            0 responses
                            15 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, 07-31-2026, 02:55 AM
                            0 responses
                            32 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, 07-24-2026, 12:17 PM
                            0 responses
                            23 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, 07-23-2026, 11:41 AM
                            0 responses
                            21 views
                            0 reactions
                            Last Post SEQadmin2  
                            Working...