Closed madisonjordan closed 1 year ago
I just did this because I don't like to put the file type in nextflow and was dreading it for RecSNV. also it appeared that it was detecting the file type anyway so specifying the type manually seemed redundant to me.
Added a few comments. From a Nextflow perspective, we'll still need to maintain the
type
argument in case users are validating files vs directories. It can just be generic now rather than having to specify the specific file type but the process module will still need two inputs: the path to the file/directory to be validated and the type (either file or directory-r or directory-rw for now)
I was thinking it would be easier in the nextflow module to just use a java check for directories to see if they were readable/writeable using isReadable
and isWriteable
and only using the file type checking from pipeval. Just because I imagine checking if a directory/file is readable or writeable would be a common use case even outside of pipeval where running the docker image might not be necessary.
and/or determine whether it's a file or directory using isFile
or isDirectory
to determine the behavior instead of specifying between directory or file options.
Added a few comments. From a Nextflow perspective, we'll still need to maintain the
type
argument in case users are validating files vs directories. It can just be generic now rather than having to specify the specific file type but the process module will still need two inputs: the path to the file/directory to be validated and the type (either file or directory-r or directory-rw for now)I was thinking it would be easier in the nextflow module to just use a java check for directories to see if they were readable/writeable using
isReadable
andisWriteable
and only using the file type checking from pipeval. Just because I imagine checking if a directory/file is readable or writeable would be a common use case even outside of pipeval where running the docker image might not be necessary.and/or determine whether it's a file or directory using
isFile
orisDirectory
to determine the behavior instead of specifying between directory or file options.
I'm not against this, we can discuss it as the NF WG. The parameter validation module already handles directory permissions so I think it should be fine to remove directory checking through pipeval
Checklist
Formatting
[x] I have read the code review guidelines and the code review best practice on GitHub check-list.
[x] The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].
[ ] I have set up or verified the branch protection rule following the github standards before opening this pull request.
File Updates
[ ] I have ensured that the version number update follows the versioning standards.
[ ] I have updated the version number/dependencies and added my name to the maintainer list in the
Dockerfile
.[ ] I have updated the version number/feature changes in the
README.md
.[ ] I have updated the version number and added my name to the contributors list in the
metadata.yaml
.[x] I have added the changes included in this pull request to the
CHANGELOG.md
under the next release version or unreleased, and updated the date.CHANGELOG.md
in the release.Docker Hub Auto Build Rules
blcdsdockerregistry
on Docker Hub.Docker Image Testing
docker run
command as described below.Test the Docker image with at least one sample. Verify the new Docker image works using:
docker run -u $(id -u):$(id -g) –w <working-directory> -v <directory-you-want-to-mount>:<how-you-want-to-mount-it-within-the-docker> --rm <docker-image-name> <command-to-the-docker-with-all-parameters>
Description
Closes #...
Testing Results
note: the checksum import and checksum function were commented out from
validate_file
function during testing.Nextflow Test
So far, tested vcfs with nextflow.
built image from this branch using:
nextflow command:
nextflow scripts located here:
nf command logs:
Docker
VCF
auto detect check:
backwards compatible check using file-vcf
BAM
autodetect bam check (valid):
autodetect bam check (invalid - empty):
autodetect bam check (invalid):
autodetect bam check (warning on missing index):
backwards compatible check (of valid file):
backwards compatible check (of invalid file):