5

If you don't provide an index, minimap2 will just generate the index on the fly (so, yes, it's done without specifying it). As such the mapping step will take longer. However, index generation is supposed to be very fast in minimap2 (a few minutes for the human genome), so it probably won't matter much. Doing it separately will therefore also not speed up ...


5

Here is the translation: $l$ = gap length $q$ = initial gap penalty for shorter gaps $e$ = short gap extension penalty per every additional gap $\tilde{q}$ = initial gap penalty for longer gaps $\tilde{e}$ = long gap extension penalty per every additional gap To understand the first of the two expressions being minimized, see the Wikipedia section on ...


3

As described in the minimap2 manual, -x STR is used to specify a preset option like -x map-pb for PacBio/Oxford Nanopore read to reference mapping (-Hk19). In general, I use the -a flag to output alignments in sam format that can then be sorted and converted to bam format, and viewed in any genome browser. The support for PAF format when it comes to ...


3

Minimap2 doesn't work well with 32bp reads by design. Older mappers like bowtie1 and bwa-aln will be better.


3

Question 1 This command will get you all of supplementary alignments for the reads. This isn't exactly what you want though. You want all of the reads that have more than one mapping. samtools view -f 2048 -h myfile_sorted.bam > supp_only.bam This bash script returns a bam file that contains all alignments for reads that have multiple mappings. It ...


2

a better solution I wasn't too happy with the previous answer that I gave, so I was fiddling around, and I realized that bedtools genomecov will give you this for free with the following workflow: minimap2 -ax asm10 ref.fasta contigs.fasta | \ samtools sort --output_fmt BAM > contigs_to_ref.bam # -bga means output in bedgraph format, including all ...


2

Depending on what level of information you need, it is not difficult to just homebrew a plot in your plotting package of choice, as PAF has relevant coordinate information. Unless you are interested in some more complex features of a plotter such as IGV, I think that this is a good flexible solution. For example, this R code makes a dot plot of the synteny ...


2

The paf format does not have the CIGAR string and base quality information that are typically present in a BAM/SAM file. While it is in principle possible to write a paf2sam converter, it's going to be very difficult to regenerate the CIGAR string with all the indel information (and maybe it's probably impossible to do so) that you'll need in a BAM/SAM file. ...


2

Yes, there is a tool to do this called R2C2 by the Vollmers lab at UC Santa Cruz. https://www.biorxiv.org/content/early/2018/06/04/338020


2

Minimap2 is not the most optimal aligner in this case, it was designed for long reads, of which 32bp reads are clearly not. You could try lowering the mnimizer k-mer length and with -k the default being 15, also try lowering the minimzer window size with -w. However I suggest using bwa aln and bwa samse for all reads under 32bp and then merging the ...


2

The TLEN for single-end reads is defined as 0 in the SAM specification, which is why this happens. You can still get the end position of the alignment by parsing the CIGAR string. An example using the pysam package in python is below: import pysam bam = pysam.AlignmentFile("myfile.bam") for b in bam.fetch(): print("This alignment spans {}:{}-{}".format(...


Only top voted, non community-wiki answers of a minimum length are eligible