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

ped file cannot be created when outdir is an s3 path #554

Open
evanfloden opened this issue May 19, 2024 · 1 comment
Open

ped file cannot be created when outdir is an s3 path #554

evanfloden opened this issue May 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@evanfloden
Copy link

Description of the bug

The ped file cannot be created when outdir is an s3 path, leading to an error.

For example, defining --outdir s3:/rarediseases-workspace/results/ with the test data gives this error:

s3:/rarediseases-workspace/results/pipeline_info/justhusky.ped (No such file or directory)

I believe it is originating from this code, although the single s3:/ is also suspicious.

// Function to generate a pedigree file
    public static File makePed(samples, outdir) {

        def case_name  = samples[0].case_id
        def outfile  = new File(outdir +"/pipeline_info/${case_name}" + '.ped')
        outfile.text = ['#family_id', 'sample_id', 'father', 'mother', 'sex', 'phenotype'].join('\t')
        def samples_list = []
        for(int i = 0; i<samples.size(); i++) {
            def sample_name =  samples[i].sample
            if (!samples_list.contains(sample_name)) {
                outfile.append('\n' + [samples[i].case_id, sample_name, samples[i].paternal, samples[i].maternal, samples[i].sex, samples[i].phenotype].join('\t'));
                samples_list.add(sample_name)
            }
        }
        return outfile
    }

Command used and terminal output

nextflow run 'https://github.com/nf-core/raredisease'
		 -name special_coulomb
		 --outdir 's3:/rarediseases-workspace/results/'
		 -r 2.0.1
		 -profile test

Relevant files

No response

System information

No response

@evanfloden evanfloden added the bug Something isn't working label May 19, 2024
@ramprasadn
Copy link
Collaborator

Thank you, @evanfloden, for bringing this bug to our attention. You are correct!

We made some changes to the code last week, moving this functionality to a nextflow process rather than relying on groovy. Hopefully, this resolves the error. Please test our dev branch and inform us if the issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants