# small RNA seq annotation from different sources
---
attributes:
  name: sranseq
  version: 20151008
recipe:
  full:
    recipe_type: bash
    recipe_cmds:
      - |
        mkdir -p srnaseq
        cd srnaseq
        wget -q -nc http://hgdownload.soe.ucsc.edu/goldenPath/mm10/database/wgEncodeGencodeBasicVM4.txt.gz
        zcat  wgEncodeGencodeBasicVM4.txt.gz | awk '{print $3"\t.\tencode\t"$5"\t"$6"\t.\t"$4"\t.\tname "$13";"}' | awk '$5-$4 < 500' > srna-transcripts.gtf
        wget -q -nc http://hgdownload.soe.ucsc.edu/goldenPath/mm10/database/tRNAs.txt.gz
        zcat tRNAs.txt.gz | awk '{print $2"\t.\ttRNA\t"$3"\t"$4"\t.\t"$7"\t.\tname "$5";"}' >> srna-transcripts.gtf
        wget -q -nc http://hgdownload.soe.ucsc.edu/goldenPath/mm10/database/rmsk.txt.gz
        zcat rmsk.txt.gz | awk '{print $6"\t.\trepeat\t"$7+1"\t"$8+1"\t.\t"$10"\t.\tname "$12";"}' >> srna-transcripts.gtf
        wget -nc -q ftp://mirbase.org/pub/mirbase/20/genomes/mmu.gff3
        awk '$3=="miRNA"' mmu.gff3 | sed 's/=/ /g' >> srna-transcripts.gtf
        wget -q -nc -O hairpin.fa.gz ftp://mirbase.org/pub/mirbase/21/hairpin.fa.gz
        zcat hairpin.fa.gz |  awk '{if ($0~/>mmu/){name=$0; print name} else if ($0~/^>/){name=0};if (name!=0 && $0!~/^>/){print $0;}}' | sed 's/U/T/g'  > hairpin.fa
        wget -q -nc -O miRNA.str.gz ftp://mirbase.org/pub/mirbase/21/miRNA.str.gz
        zcat miRNA.str.gz | awk '{if ($0~/mmu/)print $0}' > miRNA.str
    recipe_outfiles:
        - srnaseq/srna-transcripts.gtf
        - srnaseq/hairpin.fa
        - srnaseq/miRNA.str

Add srnaseq annotation for mm10
Add srnaseq annotation for mm10
