Skip to content

Instantly share code, notes, and snippets.

@CnrLwlss CnrLwlss/align.bat
Created Jun 28, 2013

What would you like to do?
@echo off
:: Make indices
bowtie2-build reference_SGD/S288C_reference_genome_R64-1-1_20110203/S288C_reference_sequence_R64-1-1_20110203.fsa indices/SGD_S288C
for /f "tokens=*" %%x in (roots.txt) do (
echo %%x
:: Align reads
bowtie2-align -x indices/SGD_S288C -1 data/%%x_1_sequence.fq -2 data/%%x_2_sequence.fq -S alignments/%%x.sam -p 12 --end-to-end
for /f "tokens=*" %%x in (roots2.txt) do (
echo %%x
:: Convert .sam alignment files to .bam alignment files (to allow ShortRead R package to read in data)
samtools view -bS alignments/%%x.sam >alignments/%%x.bam
samtools sort alignments/%%x.bam alignments/%%x_sorted.bam
samtools index alignments/%%x_sorted.bam.bam indices/%%x_sorted.bai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.