Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 673 Bytes

5.Alignment_of_reads_to_reference_genome.md

File metadata and controls

17 lines (13 loc) · 673 Bytes
# Align the reads to reference genome chromosome
bwa mem one_chromosome.fasta SRRXXXXXXX_1_paired.fastq SRRXXXXXXX_2_paired.fastq > SRRXXXXXXX.sam

Aligning reads requires a great amount of computational power and resources. If the process crash, sam files with broken ends can be generated. If this happens follow the steps below before continuing.

# To remove sam files with broke ends (this command removes the last line)
sed "$(($(wc -l < SRRXXXXXXX.sam))),\$d" SRRXXXXXXX.sam > SRRXXXXXXX.samm

# To rename the original broken files
mv SRRXXXXXXX.sam original_SRRXXXXXXX.sam

# To rename the not broken files
mv SRRXXXXXXX.samm SRRXXXXXXX.sam