-
Notifications
You must be signed in to change notification settings - Fork 19
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
Ability to set a path for NovaSeqX samplesheet #795
Conversation
8336a6b
to
d352987
Compare
d352987
to
a5a1ce3
Compare
e37aa34
to
86531f4
Compare
Created a parent class for two existing samplesheet generators. Moved common methods to this class. Through this inheritance the NovaSeqX samplesheet generator gets a standard method for setting a configurable path for a samplesheet.
86531f4
to
e8e50f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small changes and suggestions.
lib/npg/samplesheet/base.pm
Outdated
|
||
=item npg_tracking::Schema | ||
|
||
=item st::api::lims |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=item st::api::lims | |
=item st::api::lims |
|
||
=head2 batch_id | ||
my $date = DateTime->now()->strftime('%y%m%d'); # 230602 for 2 June 2023 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my $date = DateTime->now()->strftime('%y%m%d'); # 230602 for 2 June 2023 | |
my $date = DateTime->now()->strftime('%y%m%d'); # 230602 for 2 June 2023 |
my $dir = $self->samplesheet_path(); | ||
my $path = $self->file_name; | ||
if ($dir) { | ||
$dir =~ s{/\Z}{}xms; # Trim trailing slash if present. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this regex be one or more '/' at end of line?
if ($self->has_id_run()) { | ||
if ($self->id_run()) { | ||
if ($self->run->instrument_format()->model() !~ /NovaSeqX/smx) { | ||
croak 'Instrument model is not NovaSeq X Series'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be something like 'Instrument model is not NovaSeq X Series in tracking'
Or 'Instrument model must be NovaSeqX series but is ' . $self->run->instrument_format()->model() . ' in tracking database'
?
Ah but then is also changing test. Which may be bad for just refactoring. Well, only if you think it is worth.
lib/npg/samplesheet/base.pm
Outdated
'lazy_build' => 1, | ||
); | ||
sub _build_samplesheet_path { | ||
if($ENV{dev} and not $ENV{dev}=~/live/smix){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably this is not needed since paths can be set by whoever executes.
An option to read the value from the configuration file is not used.
e8e50f2
to
5aa5005
Compare
Built on top of #794
Created a parent class for two existing samplesheet
generators. Moved common methods to this class.
Through this inheritance the NovaSeqX samplesheet
generator gets a standard method for setting a path for the
samplesheet.
An option to set the path from a value in the configuration file
is dropped - it was not used for years.