Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • impeachme2
    Junior Member
    • Apr 2012
    • 6

    #1

    aligning miRNA-seq reads to other short sequence data

    What is an appropriate program for aligning miRNA-seq reads to a collection (multi-fasta of hundreds) of sequences of varying size (ranging from 20 to 200)?

    I tried blastn but it didn't seem to like using short sequences as a reference (no hits).

    Thanks,

    Dan
  • aggp11
    Member
    • Jun 2011
    • 87

    #2
    You could try bwa's aln-samse/sampe module or the Shrimp2 aligner.

    Comment

    • yangjianhunt
      Member
      • Jun 2012
      • 14

      #3
      Hi, Dan,

      I recently was doing a similar project to align sRNA deepseq reads to miRNAs, using blastn. The alignment worked really well. But I was aligning short reads to only miRNAs.
      My code for blastn is:
      blastn -query input.fa -task 'blastn-short' -db 'plant-mirna29-db.db' -word_size '18' -out 29miRblast-$faln -outfmt '6'

      Note: you need to specify " -task 'blastn-short'
      Also you may want to look at the --help page for all the parameters etc.

      I can share my code as following:
      # I am processing multiple miR-seq files using the shell script
      # I am a beginner so the code below is perhaps not really elegant
      code .sh file as follows:

      #!/bin/bash


      #-----cutadaptors--------

      clear
      echo "cutting adaptors"
      FILESadapt=`ls -1 *.fastq` #note: make sure there is no space in file names! also make sure to convert suffix from fq to fastq.
      for fadapt in $FILESadapt
      do
      echo "cutting adaptors for $fadapt
      starting at time: `date +%H%M%S`:"
      cutadapt -a TCGTATGCCG --match-read-wildcards -m 9 -o trimmed-$fadapt $fadapt > summary-$fadapt # note: make sure adaptor seq is correct!
      echo "adaptors cut for $fadapt at time: `date +%H%M%S`"
      done

      # ------converting to fasta; collapsing identical reads-----------------
      echo "Hi, $USER ! I will use FASTX_tolls to convert fastq files to fasta files and then collapse identical reads now for all trimmed fastq files in the folder"

      PATH=$PATH:/home/jiany/Software/NGS-Tools/bin/ # set up the path for fastx_tool
      echo "$PATH is set"

      FILES=`ls -1 trim*.fastq`
      for f in $FILES
      do
      echo "converting fastq to fasta file for: $f"
      echo "start at: `date +%H%M%S`"
      fastq_to_fasta -r -n -v -i $f -o $f.fasta
      echo "fasta file created for $f.fasta"
      echo "finished at: `date +%H%M%S`"
      done

      #------------------------------

      FASTA=`ls -1 trim*.fasta`
      for fa in $FASTA
      do
      echo "collapsing identical reads for: $fa"
      echo "start at: `date +%H%M%S`"
      fastx_collapser -v -i $fa -o collapsed-$fa.fasta
      echo "reads collapsed for collapsed-$fa.fasta"
      echo "finished at: `date +%H%M%S`"
      done

      echo "all completed!!"
      echo "All fastx_tools processed at: `date +%H%M%S`"


      #----------------blastn to align collapsed reads to 29 plant miRs------------------------

      echo "Hi, $USER ! Now I will use blastn to align all collapsed reads to 29 plant miRNAs in the folder"

      PATH=$PATH:/home/jiany/blastn-project/ncbi-blast-2.2.26+/bin/
      echo "$PATH is set"

      makeblastdb -dbtype 'nucl' -in 'mir-q29.fa' -input_type 'fasta' -title 'plant-mirna29-db' -out 'plant-mirna29-db.db'
      echo "blastdb for 29 plant miRs created!"

      FILESaln=`ls -1 collapsed*.fasta`
      for faln in $FILESaln
      do
      echo "blasting collapsed reads in fasta file for: $faln"
      echo "start at: `date +%H%M%S`"
      blastn -query $faln -task 'blastn-short' -db 'plant-mirna29-db.db' -word_size '18' -out 29miRblast-$faln -outfmt '6'
      echo "Reads aligned to 29 plant miRNAs for $faln"
      echo "finished at: `date +%H%M%S`"
      done
      echo "blastn alignment for all files are done!!"


      #----------------formatting result: parsing read counts; sorting on align length and plant miR; add header -------
      echo "formatting the blastn table result: parsing read counts, sorting based on plantmiR and aligned length"

      FILESfmt=`ls -1 29miR*`
      for ffmt in $FILESfmt
      do
      tr '-' '\t' < $ffmt > table-$ffmt
      sort -t $'\t' +3 -4 +5nr -6 table-$ffmt > sorted-table-$ffmt
      echo -e "seqID\tseqCount\tSpe\tmiR\tPerAln\tLenAln\tMisMtch\tNumGap\tQstart\tQend\tSstart\tSend\tEvalue\tEvalue2\tBitscore" >> Header-sorted-table-$ffmt
      cat sorted-table-$ffmt >> Header-sorted-table-$ffmt
      mv Header-sorted-table-$ffmt Header-sorted-table-$ffmt.xls

      done
      echo "All tasks completed! creating tar ball of result: `date +%y%m%d%H%M%S`-result.tar"
      tar -cf `date +%y%m%d%H%M%S`-result.tar *.xls

      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
        ...
        10-14-2026, 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, 10-22-2026, 11:13 AM
      0 responses
      26 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-22-2026, 10:48 AM
      0 responses
      20 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-15-2026, 10:52 AM
      0 responses
      36 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-14-2026, 05:39 AM
      0 responses
      43 views
      0 reactions
      Last Post SEQadmin2  
      Working...