Skip to content

Commit

Permalink
per product publish doc and variable name fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
dkj committed Jul 18, 2023
1 parent f9c03bd commit 2abd07e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/npg_pipeline/product/release/irods.pm
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,19 @@ sub _build_per_product_archive {
=head2 irods_collection4run_rel
Returns a relative path the run's destination collection. For the production
iRODS this path does not have the root C</seq> component. This methos can
iRODS this path does not have the root C</seq> component. This method can
be used as an instance method and a class (package) level method. If used
as a class (package) level method, a hardcoded common iRODS path
C<illumina/runs> is used for NovaSeq platform runs. In the instance method
this path can be customised by setting the C<irods_root_collection_ns>
attribute of the object. For objects it might be more convenient to use the
C<irods_destination_collection> attribute.
C<illumina/runs> is used for NovaSeq (or newer) platform runs. In the
instance method this path can be customised by setting the
C<irods_root_collection_ns> attribute of the object. For objects it might be
more convenient to use the C<irods_destination_collection> attribute.
If the second argument is not present, a flat run-level archive is assumed.
my $rc = $obj->irods_collection4run_rel($id_run);
my $per_product_archive = 1;
$rc = $obj->$obj->irods_collection4run_rel($id_run, $platform_is_novaseq);
$rc = $obj->$obj->irods_collection4run_rel($id_run, $per_product_archive);
$rc = npg_pipeline::product::release::irods->
irods_collection4run_rel(45666, 0);
Expand Down Expand Up @@ -182,26 +182,26 @@ is not considered as NovaSeq.
my $product = npg_pipeline::product(rpt_list => '34567:2:1');
my $pc = $obj->irods_product_destination_collection_norf(
$run_collection, $product);
my $platform_is_novaseq = 0;
my $per_product_archive = 0;
$pc = $obj->irods_product_destination_collection_norf(
'some/irods/path/34/34567', $product, $platform_is_novaseq);
'some/irods/path/34/34567', $product, $per_product_archive);
print $pc; # prints some/irods/path/34/34567
$platform_is_novaseq = 1;
$per_product_archive = 1;
my $product = npg_pipeline::product(rpt_list => '34567:2:1');
$pc = npg_pipeline::product::release::irods->
irods_product_destination_collection_norf(
'some/irods/path/34/34567', $product, $platform_is_novaseq);
'some/irods/path/34/34567', $product, $per_product_archive);
print $pc; # prints some/irods/path/34/34567/lane2/plex1
=cut

sub irods_product_destination_collection_norf {
my ($self, $run_collection, $product, $platform_is_novaseq) = @_;
my ($self, $run_collection, $product, $per_product_archive) = @_;

$run_collection or croak('Run collection iRODS path is required');
$product or croak('Product object is required');
return $platform_is_novaseq
return $per_product_archive
? join q[/], $run_collection, $product->dir_path()
: $run_collection;
}
Expand Down

0 comments on commit 2abd07e

Please sign in to comment.