From a7c2a85a51bdae2f9a168918c8e3318b8ee6f96f Mon Sep 17 00:00:00 2001 From: Li Date: Tue, 21 Jan 2020 16:35:01 -0500 Subject: [PATCH] Implement the report for barcodes. --- run-trust4 | 4 ++++ trust-simplerep.pl | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/run-trust4 b/run-trust4 index 90cc26b..7ed3504 100755 --- a/run-trust4 +++ b/run-trust4 @@ -266,6 +266,10 @@ if ( $stage <= 2 ) if ( $stage <= 3 ) { system_call( "perl $WD/trust-simplerep.pl ${prefix}_cdr3.out $simpleRepArgs > ${prefix}_report.tsv" ) ; + if ( $hasBarcode == 1 ) + { + system_call( "perl $WD/trust-barcoderep.pl ${prefix}_cdr3.out --noPartial > ${prefix}_barcode_report.tsv" ) ; + } } print STDERR "[".localtime()."] TRUST4 finishes.\n" ; diff --git a/trust-simplerep.pl b/trust-simplerep.pl index 74ebd78..ff05752 100644 --- a/trust-simplerep.pl +++ b/trust-simplerep.pl @@ -329,6 +329,8 @@ sub InferConstantGene { chomp ; my @cols = split ; + next if ( $reportPartial == 0 && $cols[9] == 0 ) ; + my $assemblyId = $cols[0] ; my $vgene = (split /,/, $cols[2])[0] ; my $dgene = (split /,/, $cols[3])[0] ; @@ -339,8 +341,6 @@ sub InferConstantGene my $key = join( "\t", ( $vgene, $dgene, $jgene, $cgene, $cols[8] ) ) ; my $type = GetChainType( $vgene, $jgene, $cgene ) ; - next if ( $reportPartial == 0 && $cols[9] == 0 ) ; - if ($type == 2) # TCR { if ($cols[10] < $assemblyMostReads{$assemblyId} * $tcrErrorFilter )