Skip to content

Add option to make per-cell bam files #96

Description

@olgabot

Currently, if one wants to count reads with differential hashes, in genes, one needs to grep/search the ENTIRE 22-gigabyte channel bam file for one single cell (out of ~700,000), which is extremely inefficient. So let's do this work up fron.
After filtering for the good barcodes, then add the option to create per-cell bam files which are useful for nf-predictorthologs.

script:
barcode_pattern = "CB:Z:${cell_barcode}-1|XC:Z:${cell_barcode}" 
"""
samtools view ${channel_bam} \\
  | rg --threads ${task.cpus}  '${barcode_pattern}' - \\
  | cat ${header_sam} - \\
  | samtools view -Sb > ${cell_barcode_bam}
"""

@lekhakaranam may be a good feature to add after the template merge (#93 )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions