Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow non deplexed Revio cells to publish now #454

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -16577,6 +16577,30 @@ t/data/pacbio/sequel/r84098_20240219_101849/1_A01/statistics/m84098_240219_11074
t/data/pacbio/sequel/r84098_20240219_101849/1_A01/statistics/m84098_240219_110741_s1.summary.json
t/data/pacbio/sequel/r84098_20240219_101849/1_A01/statistics/m84098_240219_110741_s1.zmw_metrics.csv.gz
t/data/pacbio/sequel/r84098_20240219_101849/1_A01/statistics/m84098_240219_110741_s1.zmw_metrics.json.gz
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/fail_reads/m84098_240321_114027_s1.fail_reads.bam
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/fail_reads/m84098_240321_114027_s1.fail_reads.bam.pbi
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/hifi_reads/m84098_240321_114027_s1.hifi_reads.bam
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/hifi_reads/m84098_240321_114027_s1.hifi_reads.bam.pbi
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/m84098_240321_114027_s1.primary_qc.tar.xz
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/metadata/m84098_240321_114027_s1_basic_preview_4hr.metadata.xml
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/metadata/m84098_240321_114027_s1_full_preview_23hr.metadata.xml
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/metadata/m84098_240321_114027_s1.metadata.xml
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/metadata/m84098_240321_114027_s1.sequencing_control.subreads.bam
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/metadata/m84098_240321_114027_s1.sequencing_control.subreads.bam.pbi
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/metadata/m84098_240321_114027_s1.sts.xml
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/metadata/m84098_240321_114027_s1.transferdone
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/metadata/Transfer_Test_240321_105751.txt
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/pb_formats/m84098_240321_114027_s1.fail_reads.consensusreadset.xml
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/pb_formats/m84098_240321_114027_s1.hifi_reads.consensusreadset.xml
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/statistics/m84098_240321_114027_s1.ccs_report.json
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/statistics/m84098_240321_114027_s1.ccs_report.txt
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/statistics/m84098_240321_114027_s1.fail_reads.5mc_report.json
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/statistics/m84098_240321_114027_s1.hifi_reads.5mc_report.json
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/statistics/m84098_240321_114027_s1.pbreports.log
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/statistics/m84098_240321_114027_s1.reports.zip
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/statistics/m84098_240321_114027_s1.summary.json
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/statistics/m84098_240321_114027_s1.zmw_metrics.csv.gz
t/data/pacbio/sequel/r84098_20240321_105751/1_A01/statistics/m84098_240321_114027_s1.zmw_metrics.json.gz
t/data/pacbio/sequel_analysis/0000002152/cromwell-job/call-demultiplex_barcodes/demultiplex_barcodes/5df96c44/call-lima/execution/demultiplex.bc1018_BAK8B_OA--bc1018_BAK8B_OA.bam
t/data/pacbio/sequel_analysis/0000002152/cromwell-job/call-demultiplex_barcodes/demultiplex_barcodes/5df96c44/call-lima/execution/demultiplex.bc1018_BAK8B_OA--bc1018_BAK8B_OA.bam.pbi
t/data/pacbio/sequel_analysis/0000002152/cromwell-job/call-demultiplex_barcodes/demultiplex_barcodes/5df96c44/call-lima/execution/demultiplex.bc1018_BAK8B_OA--bc1018_BAK8B_OA.consensusreadset.xml
Expand Down
27 changes: 17 additions & 10 deletions lib/WTSI/NPG/HTS/PacBio/Sequel/RunPublisher.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ our $SEQUENCE_INDEX_FORMAT = 'pbi';
our $SEQUENCE_PRODUCT = 'subreads';
our $SEQUENCE_AUXILIARY = 'scraps';

# CCS Sequence file types - Sequel IIe
# CCS Sequence file types
our $CCS_SEQUENCE_PRODUCT = 'reads';
our $HIFI_SEQUENCE_PRODUCT = 'hifi_reads';
our $HIFIUB_SEQUENCE_PRODUCT = 'unbarcoded.hifi_reads';

# CCS Sequence file types - Revio
our $REV_HIFIUB_SEQ_PRODUCT = 'hifi_reads.unassigned';

our $REV_HIFIUB_SEQ_PRODUCT = 'hifi_reads.unassigned';

## Processing types
our $OFFINSTRUMENT = 'OffInstrument';
Expand All @@ -43,6 +40,7 @@ our $ONINSTRUMENTHO = 'OnInstrumentHifiOnly';
our $ONINSTRUMENTDP = 'OnInstrumentDeplex';
our $ONINSTRUMENTSR = 'OnInstrumentPlusSubreads';
our $ONINST_REVIO1 = 'OnInstrumentRevioOne';
our $ONINST_REVIO2 = 'OnInstrumentRevioTwo';

# Generic file prefix
our $FILE_PREFIX_PATTERN = 'm[0-9a-z]+_\d+_\d+';
Expand Down Expand Up @@ -97,6 +95,11 @@ sub _build_movie_pattern {
.q{[.]}. $REV_HIFIUB_SEQ_PRODUCT .q{[.]}. $SEQUENCE_FILE_FORMAT
.q{$}, undef, 1)->[0] ) {
$revio++;
} elsif ( defined $self->list_files($smrt_name, $REVIO_PREFIX_PATTERN
.q{[.]}. $HIFI_SEQUENCE_PRODUCT .q{[.]}. $SEQUENCE_FILE_FORMAT
.q{$}, undef, 1)->[0] ) {
## non deplexed data now supported for Revio
$revio++;
}
last if $revio > 0;
}
Expand Down Expand Up @@ -166,7 +169,8 @@ sub publish_files {
($num_files_cell, $num_processed_cell, $num_errors_cell) =
$self->_publish_on_instrument_cell($smrt_name, $process_type);
}
elsif ($process_type eq $ONINST_REVIO1) {
elsif (($process_type eq $ONINST_REVIO1) ||
($process_type eq $ONINST_REVIO2)) {
($num_files_cell, $num_processed_cell, $num_errors_cell) =
$self->_publish_revio_instrument_cell($smrt_name, $process_type);
}
Expand Down Expand Up @@ -211,7 +215,7 @@ sub _processing_type {
}
elsif (defined $self->list_files($smrt_name, $self->_movie_pattern .q{[.]}.
$HIFI_SEQUENCE_PRODUCT .q{[.]}. $SEQUENCE_FILE_FORMAT .q{$})->[0]) {
$type = $ONINSTRUMENTHO;
$type = ($self->_is_onrevio) ? $ONINST_REVIO2 : $ONINSTRUMENTHO;
}
elsif (defined $self->list_files($smrt_name, $self->_movie_pattern .q{[.]}.
$HIFIUB_SEQUENCE_PRODUCT .q{[.]}. $SEQUENCE_FILE_FORMAT .q{$})->[0]) {
Expand Down Expand Up @@ -325,8 +329,7 @@ sub _publish_revio_instrument_cell {

my $pub_xml = q[sts];

my ($nfb, $npb, $neb) = $self->_publish_deplexed_files
($smrt_name);
my ($nfb, $npb, $neb) = $self->_publish_deplexed_files($smrt_name);
my ($nfx, $npx, $nex) = $self->publish_xml_files
($smrt_name, $pub_xml);
my ($nfa, $npa, $nea) = $self->publish_aux_files
Expand Down Expand Up @@ -641,6 +644,9 @@ sub publish_image_archive {
q{hifi_reads.lima_summary.txt|summary.json|fail_reads.json|hifi_reads.json|}.
q{ccs_report.json|fail_reads.unassigned.json|hifi_reads.unassigned.json};
}
elsif ($process_type eq $ONINST_REVIO2) {
$file_types = q{ccs_report.txt|summary.json|ccs_report.json};
}

my $file_pattern1 = $self->_movie_pattern .q{.}. $file_types . q{$};
my $file_count = scalar split m/[|]/msx, $file_types;
Expand All @@ -649,7 +655,8 @@ sub publish_image_archive {
push @runfolder_files, @{$runfolder_file1};

# Optional 5mC report file
my $fmc_pattern = ($process_type eq $ONINST_REVIO1) ?
my $fmc_pattern =
(($process_type eq $ONINST_REVIO1) || ($process_type eq $ONINST_REVIO2)) ?
q{fail_reads.5mc_report.json|hifi_reads.5mc_report.json} : q{5mc_report.json};
my $file_pattern2 = $self->_movie_pattern .q{.}. $fmc_pattern .q{$};
my $runfolder_file2 = $self->list_files($smrt_name,$file_pattern2);
Expand Down
Loading
Loading