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

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, Yesterday, 10:05 AM
      0 responses
      8 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 08-13-2026, 12:22 PM
      0 responses
      33 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 08-11-2026, 10:35 AM
      0 responses
      27 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 08-06-2026, 07:41 AM
      0 responses
      38 views
      0 reactions
      Last Post SEQadmin2  
      Working...