9

Oh you silly sausage, pysam.index takes a bam file name, not a python object. import pysam pysam.index("regular_bwamem_mapping.bam") will index your .bam file.


2

samtools sort blasted_SRR6649368.bam -o sorted_SRR6649368.bam -n These error messages indicate that the reads are not sorted by coordinate — in particular, that the reads mapped to ScdB1pO_646;HRSCAF=880 are not all together, and that the reads at positions 11159020 < 11158717 are not sorted by position on their chromosome. This is because samtools sort -...


2

I am not aware of any widespread index formats for query-by-QNAME for BAM or query-by-ID for VCF. I thought there were historical samtools{-devel,-help} threads to the effect of “in principle one could index a named-sorted BAM file, but there's insufficient demand so no-one's ever implemented it”, but I can't find any just now. Moreover note that VCF files ...


2

I actually went back to the output folder on the MiniSeq and found this file: DemultiplexSummaryF1L1, which contains demultiplexing information of the whole run. Half-way through this file I found what I was looking for: ### Most Popular Index Sequences ### Columns: Sequence ReverseComplement HitCount Index ...


1

I don't know that you can get them from that file. I've noticed that when the Miseq is left to run its version of fastq generation software, there are no indices in the undetermined file. I usually run bcl2fastq myself if I want that information. They recently came out with a new version of software for the MiSeq, so things might be different now.


1

So if the purpose of obtaining file offsets is to access subportions of remote files via protocols that samtools supports, as mentioned in this comment, then you can make your life easier and use samtools/tabix directly on the cli, prefixing your datafile with the corresponding scheme. One side effect of using the CLI however, is that the blocks retrieved ...


1

I'm late to the party but simply run cellranger mkfastq twice, with different arguments for the mask and with --filter-dual-index for the double-indexed samples. In a second step you then have to disentangle the dual A+B reads from single-index A reads based on the readID's that are found in both of the demultiplexings. This is cumbersome and time+diskspace ...


1

Take a look at grabix. Using grabix you could implement a binary search on a VCF sorted by rsID and compressed using bgzip.


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