nanopore_tools_for_polishing
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| nanopore_tools_for_polishing [2020/06/17 13:04] – 24.138.68.92 | nanopore_tools_for_polishing [2024/08/07 13:01] (current) – 134.190.232.164 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Polishing your MinION assembly ====== | ====== Polishing your MinION assembly ====== | ||
| Documentation by Jon Jerlström Hultqvist and Shelby Williams | Documentation by Jon Jerlström Hultqvist and Shelby Williams | ||
| + | (updates by Joran Martijn) | ||
| **Be aware that some scripts and commands might not be working any longer on Perun due to the switch to the new conda-environment system. Sections will be progressively updated to reflect this.** | **Be aware that some scripts and commands might not be working any longer on Perun due to the switch to the new conda-environment system. Sections will be progressively updated to reflect this.** | ||
| Line 81: | Line 82: | ||
| First, make a BWA index of the assembly you wish to map onto by using the following command: | First, make a BWA index of the assembly you wish to map onto by using the following command: | ||
| + | |||
| < | < | ||
| bwa index assembly_to_polish.fasta | bwa index assembly_to_polish.fasta | ||
| </ | </ | ||
| + | |||
| Next, use the meteora_bwa.sh script to map the short reads onto your assembly. This will create a sorted.bam file. In this example, two paired-end read files will be mapped: | Next, use the meteora_bwa.sh script to map the short reads onto your assembly. This will create a sorted.bam file. In this example, two paired-end read files will be mapped: | ||
| + | |||
| < | < | ||
| - | bwa mem -t 16 assembly_to_polish.fasta / | + | bwa mem \ |
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| </ | </ | ||
| + | |||
| + | UPDATE: You can now run bwa-mem2, which is an optimized version of bwa mem. It generates the exact same output, but is 2-4x faster: | ||
| + | |||
| + | < | ||
| + | bwa-mem2 mem \ | ||
| + | -t 16 \ | ||
| + | assembly_to_polish.fasta \ | ||
| + | / | ||
| + | / | ||
| + | samtools sort --threads 16 -o piloninput.sorted.bam | ||
| + | </ | ||
| + | |||
| Once this is finished, use Pilon.sh to make changes in the assembly and generate a new consensus sequence. Pilon.sh can be formatted like so: | Once this is finished, use Pilon.sh to make changes in the assembly and generate a new consensus sequence. Pilon.sh can be formatted like so: | ||
| + | |||
| < | < | ||
| - | java -Xmx16G -jar / | + | java -Xmx16G -jar / |
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| </ | </ | ||
| + | |||
| + | UPDATE: The --threads option is as of v1.24 no longer maintained. It seems Pilon doesn' | ||
| + | |||
| You may run into an error where Pilon does not recognize the bam file created from the previous step as being indexed. To fix this, run: | You may run into an error where Pilon does not recognize the bam file created from the previous step as being indexed. To fix this, run: | ||
| + | |||
| < | < | ||
| samtools index / | samtools index / | ||
| </ | </ | ||
| + | |||
| This will return a .bam.bai file. This file needs to be in the same folder as Pilon.sh, but does not need to be placed in the script. | This will return a .bam.bai file. This file needs to be in the same folder as Pilon.sh, but does not need to be placed in the script. | ||
| Line 102: | Line 134: | ||
| Shell script: | Shell script: | ||
| {{ : | {{ : | ||
| + | |||
| + | < | ||
| + | #!/bin/bash | ||
| + | #$ -S /bin/bash | ||
| + | . / | ||
| + | #$ -cwd | ||
| + | #$ -pe threaded 16 | ||
| + | |||
| + | #cd / | ||
| + | |||
| + | echo " | ||
| + | |||
| + | unset PYTHONPATH | ||
| + | export PATH=/ | ||
| + | export LD_LIBRARY_PATH=/ | ||
| + | |||
| + | / | ||
| + | |||
| + | |||
| + | echo " | ||
| + | |||
| + | </ | ||
| Formatting: | Formatting: | ||
nanopore_tools_for_polishing.1592409862.txt.gz · Last modified: by 24.138.68.92
