Preparing BAM file for user data
1. Make a FASTA file with unique reads only using the 'collapse_reads.pl' script in miRDeep2.
This removes duplicate reads and leaves read count in the title line as in '>sample_readID_x10',
where 10 indicates the read count.
2. Map the unique reads to the hg19 human reference genome or premature miRNA sequences.
We recommend using 'Bowtie -a -S out.sam -v 0' for perfect matches.
'-v 0' option should be modified to allow mismatches.
4. Use 'samtools view' and 'samtools merge' to select alignment for miRNAs of interest only.
This step is optional, but will reduce the file size and uploading time.
samtools view aln.sorted.bam chr2:20,100,000-20,200,000
samtools merge out.bam in1.bam in2.bam in3.bam