I found another somewhat strange issue, I think po...
# sarek
m
I found another somewhat strange issue, I think potentially related to S3 paths and file-path-patterns Running sarek with a parameter for
known_indels
the same format as in the igenome.config :
Copy code
known_indels = "s3://h37-reference-data/Homo_sapiens/GATK/GRCh38/Annotation/GATKBundle/{Mills_and_1000G_gold_standard.indels.hg38,beta/Homo_sapiens_assembly38.known_indels}.vcf.gz"
Results in a failure in the engine logs of:
Copy code
INPUT_URI_NOT_FOUND
S3 access denied: s3://h37-reference-data/Homo_sapiens/GATK/GRCh38/Annotation/GATKBundle/
I believe this is related to nexflow's handling of the {} closure as specified by the
file-path-pattern
Somewhere the URI is getting truncated to the "parent directory" instead of the individual file names and, of course, S3 doesn't have directories There are some unresolved (closed) issues in nexflow-io: https://github.com/nextflow-io/nextflow/issues/1282 Not sure there is an easy solution here; I can probably make a combined VCF manually and pass a single file, but given that the expansion of that closure happens in the nextflow engine, this might be a bigger issue.
a
Do you have any more logs? AFAICT the parameter as defined in
igenomes
is also set in the
params
by the time it goes through
nf-schema
, which would mean it passes
file-path-pattern
fine? It simply looks like you do not have permission to access the bucket (everything before the filepath)
m
You may be right; trying again - the specific S3 IAM permissions required are not totally clear It's a bit weird b/c the workflow is happily reading other files from that bucket, but something is trying to run some kind of s3 request that isn't ListBucket or GetObject I may have to dig into the nextflow S3 code to figure out exactly what operation it's trying to perform
m
Agreeing with Arthur, this looks like a permission issue to me. And it feels weird that you can get other files from that bucket
m
Sorted out last night. This check https://github.com/nextflow-io/nf-schema/blob/master/src/main/groovy/nextflow/validation/validators/evaluators/FormatFilePathPatternEvaluator.groovy#L32 -
file.exists()
eventually creates an S3ObjectSummaryLookup, which issues a
listObjects
request to the S3 API https://github.com/nextflow-io/nextflow/blob/master/plugins/nf-amazon/src/main/nextflow/cloud/aws/nio/util/S3ObjectSummaryLookup.java#L84 So the IAM permissions need to include
s3:ListBucket
on the top-level bucket ID:
"arn:aws:s3:::h37-reference-data"
while accessing individual items by fully qualified name/path requires
s3:GetObject
on objects in the bucket:
"arn:aws:s3:::h37-reference-data/*"
Sorry for the noise, hopefully this being captured here ^ helps if anyone gets stuck on something similar
m
Nice catch
I'll communicate this with the Nextflow team right away cc @Ben Sherman
🙌 1