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
        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
      • seqadmin
        Current Approaches to Protein Sequencing
        by seqadmin


        Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
        04-04-2024, 04:25 PM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 04-25-2024, 11:49 AM
      0 responses
      15 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-24-2024, 08:47 AM
      0 responses
      16 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      62 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      60 views
      0 likes
      Last Post seqadmin  
      Working...
      X