Multiple optional inputs
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 36/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- backend
Hướng nghiên cứu
Read the optional input pattern and its examples in the repository; the payload does not identify a file or test. Reproduce the reported collision with the supplied process and workflow, then determine how the pattern should generalize to multiple optional inputs. Done means documenting a working approach, with an example that avoids the reported collision.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The optional input pattern does not seem to work if a process has more than one optional input.
For example, the following test:
params.inputs = "$projectDir/data/sites.txt"
params.filter = "$projectDir/assets/NO_FILE"
process foo {
debug true
input:
path seq
path(opt)
path(opt2)
script:
def filter = opt.name != 'NO_FILE' ? "--filter $opt" : ''
def filter2 = opt2.name != 'NO_FILE' ? "--filter $opt" : ''
"""
echo your_command --input $seq $filter $filter2
"""
}
workflow {
prots_ch = Channel.fromPath(params.inputs, checkIfExists:true)
opt_file = file(params.filter, checkIfExists:true)
opt2_file = file(params.filter, checkIfExists:true)
foo(prots_ch, opt_file, opt2_file)
}
Returns a collision error:
ERROR ~ Error executing process > 'foo (1)'
ERROR ~ Error executing process > 'foo (1)'
Caused by: Process `foo` input file name collision -- There are multiple input files for each of the following file names: NO_FILE
Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`
-- Check '.nextflow.log' file for details
How should one generalize this pattern to handle multiple optional inputs?
- Ngôn ngữ chính
- Nextflow
- Star
- 374
- Fork
- 73
- Merge trung bình
- 15 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nextflow-io/patterns
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
nextflow-io/patterns#42 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
nextflow-io/patterns#40 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
nextflow-io/patterns#30 ·
-
Add combinations patternĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
nextflow-io/patterns#21 ·
-
Add example how parse json fileĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
nextflow-io/patterns#14 ·
Tất cả issue của nextflow-io/patterns
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
G-nn-r/lg_heatpump#52 ·
-
grep: unknown parameter file_path is silently dropped, so the search runs over the whole cwdĐang mởarea: core bug priority: high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
griffinwork40/agent-afk#4872 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fleet size/m
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sipyourdrink-ltd/bernstein#7517 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
BUG-MERGE-TO-HDR-RESULT-NAMEĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
storytold/photocraft#14025 ·
Maintainer thường phản hồi trong vòng 1 ngày