Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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

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

    Comment


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

      • seqadmin
        Recent Advances in Sequencing Analysis Tools
        by seqadmin


        The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
        05-06-2024, 07:48 AM
      • seqadmin
        Essential Discoveries and Tools in Epitranscriptomics
        by seqadmin




        The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
        04-22-2024, 07:01 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Yesterday, 06:57 AM
      0 responses
      12 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-06-2024, 07:17 AM
      0 responses
      16 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-02-2024, 08:06 AM
      0 responses
      20 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-30-2024, 12:17 PM
      0 responses
      24 views
      0 likes
      Last Post seqadmin  
      Working...
      X