From 4675da090f9dcb25a4b5c8ace66bfdfffd1d828f Mon Sep 17 00:00:00 2001 From: Mike Thang Date: Mon, 17 Jun 2024 16:47:51 +1000 Subject: [PATCH] Add multi to Cellranger --- tools/cellranger/cellranger.xml | 150 +++++++++++++++++++++++++++++++- tools/cellranger/macros.xml | 78 +++++++++++++++++ 2 files changed, 226 insertions(+), 2 deletions(-) diff --git a/tools/cellranger/cellranger.xml b/tools/cellranger/cellranger.xml index 5d8db8d7..ee732dbc 100644 --- a/tools/cellranger/cellranger.xml +++ b/tools/cellranger/cellranger.xml @@ -8,6 +8,7 @@ > tmp && + #else: + #set library_record=','.join([str($sample_name_directory),str($sample_fastq_directory),str(""),str($lib_type)]) + echo '$library_record' >> tmp && + #end if + mkdir -p $input_directory/$sample_name_directory && + #set collection_identifier = re.sub('[^\s\w\-]', '_', str($input.input_collection.element_identifier)) + #for $f in $input.input_collection: + #set identifier = re.sub('[^\s\w\-\\.]','_',str($f.element_identifier)) + ln -sf '$f' "\$(pwd)"/$input_directory/$sample_name_directory/$identifier && + #end for + #end for #end if #if str($tool_cond.tool) == "count" @@ -60,15 +84,69 @@ 2>&1 #elif str($tool_cond.tool) == "mkgtf" cellranger mkgtf $raw_gtf $filtered_gtf $attribute + #elif str($tool_cond.tool) == "multi" + cp '$multi_config' 'config.txt' && + cat tmp >> 'config.txt' && + sed -i "s|input_data_directory|`pwd`/input_data_directory|g" config.txt && + cellranger multi --id=output_directory + --csv=config.txt + --localcores=\${GALAXY_SLOTS:-2} + --localmem=\${GALAXY_MEMORY_GB:-8} + --disable-ui + && gunzip -f output_directory/outs/per_sample_outs/output_directory/count/sample_filtered_feature_bc_matrix/matrix.mtx.gz + && gunzip -f output_directory/outs/per_sample_outs/output_directory/count/sample_filtered_feature_bc_matrix/features.tsv.gz + && gunzip -f output_directory/outs/per_sample_outs/output_directory/count/sample_filtered_feature_bc_matrix/barcodes.tsv.gz + && rm tmp + && 2>&1 #end if ]]> + + + - + + @@ -101,6 +179,25 @@ + + + + + + +
+ +
+ +
+
+ + +
+
+ +
+
@@ -131,6 +228,38 @@ tool_cond['tool'] == 'mkref' + + tool_cond['tool'] == 'multi' + + + tool_cond['tool'] == 'multi' + + + tool_cond['tool'] == 'multi' + + + tool_cond['tool'] == 'multi' + + + tool_cond['tool'] == 'multi' + + + tool_cond['tool'] == 'multi' + + + + + tool_cond['tool'] == 'multi' and tool_cond['GEX']['no_bam'] + + + + + + + + + tool_cond['tool'] == 'multi' and tool_cond['inputs']['type'] == "VDJ" + @@ -151,6 +280,7 @@ Cell Ranger is a set of analysis pipelines that process Chromium single cell dat - count : aligns sequencing reads in FASTQ files to a reference transcriptome - mkref : build a custom reference - mkgtf : filter GTF files with the feature attributes (i.e gene_biotype:protein_coding) +- multi : tool for analyzing 3' Cell Multiplexing data **CellRanger Count** @@ -197,12 +327,28 @@ Cell Ranger is a set of analysis pipelines that process Chromium single cell dat - A filtered reference genome GTF file +**CellRanger multi** + +**Input** + +1) Single Cell gene expression dataset in a collection named by the sample name. Example, if the gene expression sample name is sc5p_v2_hs_B_1k_5gex_S1_L001_I1_001.fastq.gz and the collection name should be formatted as sc5p_v2_hs_B_1k_5gex (the partial prefix of the gene expression sample name). +2) Single Cell VDJ dataset in a collection named by the sample name. Example, if the VDJ sample name is sc5p_v2_hs_B_1k_b_S1_L001_I1_001.fastq.gz and the collection name should be formatted as sc5p_v2_hs_B_1k_b ( the partial prefix of the VDJ sample name). +3) both 1) and 2) + +**Output** + +1) Gene expression - A summary file in html format, two h5 files, Cloupe, barcode, feature and a matrix file. +2) VDJ - Vloupe (Cellranger supported file format), clonotypes, airr_rearrangement, consensus_annotations, filtered_contig_annotations, filtered_contig, concat_ref and consensus. +3) Both output 1 and output 2 will be generated only if both gene expression and VDJ are used as an input. + .. class:: infomark **More Information** - `CellRanger`: https://support.10xgenomics.com/docs/citations +- `Output` : see more https://www.10xgenomics.com/support/software/cell-ranger/latest/analysis/outputs/cr-5p-outputs-overview-vdj + **Citations for 10x Genomics Publications** ]]> diff --git a/tools/cellranger/macros.xml b/tools/cellranger/macros.xml index dffa7ad4..3afd2baa 100644 --- a/tools/cellranger/macros.xml +++ b/tools/cellranger/macros.xml @@ -17,6 +17,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -35,4 +67,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +