Alignment
CMD go through
bowtie2 -X2000 --mm --local -1 $fastq1 -2 $fastq2 | samtools view -Su /dev/stdin | samtools sort & index > xxx.PE2SE.bam &.bai 2> align.log
For bowtie2:
- Use memory-mapped I/O to load the index (--mm);
- '-X2000' means maximum fragment length for valid paired-end alignments is 2000bp;
- --local: a preset options mode, default as --sensitive-local,
For samtools view:
- -S: ignore for compatibility with previous samtools versions
- -u: uncompressed BAM outputs
SE
bowtie2 --local -x $bowtie2_idx --threads 8 -U /home/zhc268/scratch/seqdata/EC9.fastq.bz2 2> ${align.log} | \
samtools view -Su /dev/stdin | samtools sort - $prefix
NOTE on paired-end alignments
- Currently the name tag including
PE2SE
; it probably is a wrong indicator as we didn't convert PE to SE.