Skip to content

Commit

Permalink
Removing the custom barcode logic for initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
atrull314 committed Jan 11, 2024
1 parent 42a8665 commit 3c76858
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 328 deletions.
137 changes: 0 additions & 137 deletions bin/create_regex.py

This file was deleted.

4 changes: 2 additions & 2 deletions bin/pre_extract_barcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def parse_args():
)
arg_parser.add_argument("-o", "--output_file", required=True, type=str, help="The output fastq")
arg_parser.add_argument(
"-f", "--barcode-format", required=False, type=str, help="The barcode/umi format (Options: cellranger)"
"-f", "--barcode-format", required=True, type=str, help="The barcode/umi format (Options: cellranger)"
)

args = arg_parser.parse_args()
Expand Down Expand Up @@ -88,7 +88,7 @@ def extract_barcode(input_file, barcode_file, output, bc_format):
read_info = {}

# Strip the primer, bc, umi, and poly-T
if bc_format == "cellranger":
if bc_format in ["cellranger_3_prime", "cellranger_5_prime"]:
read_info = strip_read_cellranger(bc_index, seq, quals)

if read_info:
Expand Down
6 changes: 1 addition & 5 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ params {
gtf = "https://raw.githubusercontent.com/nf-core/test-datasets/scnanoseq/reference/chr21.gtf"

// Barcode options
cell_barcode_pattern = ""
identifier_pattern = "fixed_seq_1,cell_barcode_1,umi_1,fixed_seq_2"
cell_barcode_lengths = "16"
umi_lengths = "12"
fixed_seqs = "CTACACGACGCTCTTCCGATCT, TTTTTTTTTT"
barcode_format = "cellranger_3_prime"

}
46 changes: 0 additions & 46 deletions modules/local/create_regex.nf

This file was deleted.

3 changes: 2 additions & 1 deletion modules/local/preextract_fastq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ process PREEXTRACT_FASTQ {

input:
tuple val(meta), path(reads), path(bc_list)
val bc_format

output:
tuple val(meta), path("*.R1.fastq.gz"), emit: r1_reads
Expand All @@ -27,7 +28,7 @@ process PREEXTRACT_FASTQ {
pre_extract_barcodes.py -i ${reads} \\
-b ${bc_list} \\
-o ${prefix} \\
-f cellranger
-f ${bc_format}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
4 changes: 3 additions & 1 deletion modules/local/tag_barcodes.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ process TAG_BARCODES {
'biocontainers/pysam:0.19.1--py310hff46b53_1' }"

input:
tuple val(meta), path(bam), path(bai), path(r1_fastq), val(bc_length), val(umi_length)
tuple val(meta), path(bam), path(bai), path(r1_fastq)
val bc_length
val umi_length

output:
tuple val(meta), path("*.tagged.bam"), emit: tagged_bam
Expand Down
7 changes: 1 addition & 6 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ params {
skip_trimming = false

// Cell barcode options
cell_barcode_pattern = null
whitelist = null
identifier_pattern = null
cell_barcode_lengths = null
umi_lengths = null
fixed_seqs = null
barcode_preset = null
barcode_format = null

// Library strandness option
stranded = null
Expand Down
53 changes: 21 additions & 32 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@
"split_amount": {
"type": "integer",
"description": "The amount of lines to split the fastq into (Default: 0)",
"default": 0
"default": 0,
"fa_icon": "fas fa-cut"
}
}
},
Expand Down Expand Up @@ -137,35 +138,18 @@
"whitelist": {
"type": "string",
"description": "The file containing a list of barcodes.",
"format": "file-path"
},
"cell_barcode_pattern": {
"type": "string",
"description": "Regex for the cell barcode pattern."
},
"identifier_pattern": {
"type": "string",
"description": "Human readable regex for the cell barcode pattern."
},
"cell_barcode_lengths": {
"type": "string",
"description": "The comma delimited list of cell barcode lengths."
},
"umi_lengths": {
"type": "string",
"description": "The comma delimited list of umi lengths."
},
"fixed_seqs": {
"type": "string",
"description": "The comma delimited list of fixed barcode sequences."
"format": "file-path",
"fa_icon": "far fa-file-alt"
},
"barcode_preset": {
"barcode_format": {
"type": "string",
"description": "Specify a preset option for barcode formatting.",
"enum": ["cellranger_3_prime", "cellranget_5_prime"]
"description": "Specify the format for the barcode+umi",
"enum": ["cellranger_3_prime"],
"fa_icon": "fas fa-barcode"
}
},
"fa_icon": "fas fa-microscope"
"fa_icon": "fas fa-microscope",
"required": ["barcode_format"]
},
"mapping": {
"title": "Mapping",
Expand All @@ -176,12 +160,14 @@
"stranded": {
"type": "string",
"enum": ["None", "reverse", "forward"],
"description": "Library strandness option."
"description": "Library strandness option.",
"fa_icon": "fas fa-dna"
},
"kmer_size": {
"type": "integer",
"default": 14,
"description": "Minimizer k-mer length."
"description": "Minimizer k-mer length.",
"fa_icon": "fas fa-sort-amount-down"
},
"save_secondary_alignment": {
"type": "boolean",
Expand All @@ -199,17 +185,20 @@
"properties": {
"analyze_uncorrected_bam": {
"type": "boolean",
"description": "Run downstream steps on the bam that contains reads that could not be corrected. Do not use this if no whitelist is provided."
"description": "Run downstream steps on the bam that contains reads that could not be corrected. Do not use this if no whitelist is provided.",
"fa_icon": "fas fa-search"
},
"counts_level": {
"type": "string",
"description": "What level to generate the counts matrix at. Options: 'gene', 'transcript'.",
"enum": ["gene", "transcript", "both"]
"enum": ["gene", "transcript", "both"],
"fa_icon": "fas fa-file-csv"
},
"retain_introns": {
"type": "boolean",
"default": true,
"description": "Indicate whether to include introns in the count matrices"
"description": "Indicate whether to include introns in the count matrices",
"fa_icon": "fas fa-filter"
}
},
"required": ["counts_level"]
Expand Down Expand Up @@ -247,7 +236,7 @@
"description": "Skip NanoComp from BAM file(s)."
},
"skip_rseqc": {
"type": "string",
"type": "boolean",
"fa_icon": "fas fa-forward"
},
"skip_seurat": {
Expand Down
Loading

0 comments on commit 3c76858

Please sign in to comment.