Package: bbcu.singleCellBamQueries
## Queries on bam file of single cell per genome position for finding rare mutationssingle-cell-bam-queries.py –helpusage: single-cell-bam-queries.py [-h] –input-file INPUT_FILE –output-fileOUTPUT_FILE [–coordinates COORDINATES]
[–filtered-cell-barcodes-file FILTERED_CELL_BARCODES_FILE]
[–min-mapq MIN_MAPQ]
[–max-gene-length MAX_GENE_LENGTH]
[–threads THREADS] [–min-cells MIN_CELLS]
[–max-cells MAX_CELLS]
[–min-mutated-umis MIN_MUTATED_UMIS]
[–max-mutated-umis MAX_MUTATED_UMIS]
[–min-reads-per-non-mutated-umi MIN_READS_PER_NON_MUTATED_UMI]
[–max-reads-per-non-mutated-umi MAX_READS_PER_NON_MUTATED_UMI]
[–min-non-mutated-umis MIN_NON_MUTATED_UMIS]
[–max-non-mutated-umis MAX_NON_MUTATED_UMIS]
[–min-reads-per-mutated-umi MIN_READS_PER_MUTATED_UMI]
[–max-reads-per-mutated-umi MAX_READS_PER_MUTATED_UMI]
[–enable-cells-with-invalid-umis-num]
[–enable-umis-with-invalid-reads-num]
[–tag-of-umi TAG_OF_UMI]
[–tag-of-cell-barcode TAG_OF_CELL_BARCODE]
[–umi-start UMI_START]
[–umi-length UMI_LENGTH]
[–cell-barcode-start CELL_BARCODE_START]
[–cell-barcode-length CELL_BARCODE_LENGTH]
[–log-file LOG_FILE]Queries on bam file of single cell per genome position.The bam file must be sorted and indexed with the commands:samtools sort filename.bam > filename.sorted.bam
samtools index filename.sorted.bamBy default the umi and barcode cells are comptible to bam files from cellranger.
For other formats you need to change the parameters of tags and cell barcodes.Pre-request: python package: pysamoptional arguments:-h,--helpshow this help message and exit--input-fileINPUT_FILEFull path to input .bam or .sam file (default: None)--output-fileOUTPUT_FILEFull path to output file name (default: None)--coordinatesCOORDINATESCoordinates of the genome. The default is all genome.
For example: chr1:1000000-2000000, or for all
chromosom: chr1 (default: all)--filtered-cell-barcodes-fileFILTERED_CELL_BARCODES_FILEText file with list of cell barcodes. Counts only
these cells (optional) (default: None)--min-mapqMIN_MAPQMinimum quality of the read mapping (default: 10)--max-gene-lengthMAX_GENE_LENGTHMaximum length of the gene. Reads that will be mapped
to longer bases will be discarded (default: 100000)--threadsTHREADSnumber of threads. You can run the chromosome itself
in several threads. You can use this prameter only if
you specify the start and end coordinates explicitely
in the format: chr1:0-14000000 or if the bam file
contains header lines with the lengths of the
chromosomes, you can check it with the commands:
samtools view -h filename.bam (default: 1)--min-cellsMIN_CELLSmininum cells in genome position that contains the
number of umis and reads according to the other
parameters (default: 1)--max-cellsMAX_CELLSmaximum cells in genome position that contains the
number of umis and reads according to the other
parameters (default: 1000000000)--min-mutated-umisMIN_MUTATED_UMISmininum umis per cell that all reads contain mutation
in the position (default: 1)--max-mutated-umisMAX_MUTATED_UMISmaximum umis per cell that all reads contain mutation
in the position (default: 1000000000)--min-reads-per-non-mutated-umiMIN_READS_PER_NON_MUTATED_UMImininum reads in at least one of umis in the cell in
genome position (default: 1)--max-reads-per-non-mutated-umiMAX_READS_PER_NON_MUTATED_UMImaximum reads in at least one of umis in the cell in
genome position (default: 1000000000)--min-non-mutated-umisMIN_NON_MUTATED_UMISmininum umis per cell that all reads not contain
mutation in the genome position (default: 1)--max-non-mutated-umisMAX_NON_MUTATED_UMISmaximum umis per cell that all reads not contain
mutation in the genome position (default: 1000000000)--min-reads-per-mutated-umiMIN_READS_PER_MUTATED_UMImininum reads in at least one of umis in the cell in
genome position (default: 1)--max-reads-per-mutated-umiMAX_READS_PER_MUTATED_UMImaximum reads in at least one of umis in the cell in
genome position (default: 1000000000)--enable-cells-with-invalid-umis-numenable positions that contain cell/s with not valid
umis number (according to ther range in the other
parameters) (default: False)--enable-umis-with-invalid-reads-numenable positions that contain umi/s with not valid
reads number (according to ther range in the other
parameters) (default: False)--tag-of-umiTAG_OF_UMIthe tag of umi in bam file (default: UR)--tag-of-cell-barcodeTAG_OF_CELL_BARCODEthe tag of umi in bam file (default: CR)--umi-startUMI_STARTlocation in tag where the umi start (0-based)
(default: 0)--umi-lengthUMI_LENGTHlength of umi (default: 10)--cell-barcode-startCELL_BARCODE_STARTlocation in tag where the cell barcode start (0-based)
(default: 0)--cell-barcode-lengthCELL_BARCODE_LENGTHlength of cell barcode (default: 16)--log-fileLOG_FILELog File (default: None)