Conversation
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
adthrasher
left a comment
There was a problem hiding this comment.
All of these comments are based on the first commit.
| Int disk_size_gb = bam_size_gb + ceil(size(gtf, "GB")) + ceil(size(reference_fasta_gz, | ||
| "GB")) + modify_disk_size_gb |
There was a problem hiding this comment.
This isn't that bad, but I'd almost prefer to treat addition chains similarly to arrays and line break on each element. This line break makes sense to me as it is the first available break that doesn't exceed the line length, but it feels weird to break in the middle of the size call inside of a ceil and within the + operator.
There was a problem hiding this comment.
maybe length of chain should be considered? Something like "if more than N (3? 4?) binary operators in a chain, line break on each"?
There was a problem hiding this comment.
I think this comment is superseded by the "priority list" and "clauses" discussion we've had.
tools/arriba.wdl
Outdated
| ~{( | ||
| if length(interesting_contigs) > 0 | ||
| then "-i " + sep(",", quote(interesting_contigs)) | ||
| else "" | ||
| )} \ | ||
| ~{( | ||
| if length(viral_contigs) > 0 | ||
| then "-v " + sep(",", quote(viral_contigs)) | ||
| else "" | ||
| )} \ | ||
| ~{( | ||
| if length(disable_filters) > 0 | ||
| then "-f " + sep(",", quote(disable_filters)) | ||
| else "" | ||
| )} \ | ||
| ~{(if length(interesting_contigs) > 0 then "-i " + sep(",", quote( | ||
| interesting_contigs | ||
| )) else "")} \ | ||
| ~{(if length(viral_contigs) > 0 then "-v " + sep(",", quote(viral_contigs)) | ||
| else "")} \ | ||
| ~{(if length(disable_filters) > 0 then "-f " + sep(",", quote(disable_filters) | ||
| ) else "")} \ |
tools/bwa.wdl
Outdated
| String prefix = sub( | ||
| basename(fastq), | ||
| "(([_.][rR](?:ead)?[12])((?:[_.-][^_.-]*?)*?))?\\.(fastq|fq)(\\.gz)?$", | ||
| String prefix = sub(basename(fastq), "(([_.][rR](?:ead)?[12])((?:[_.-][^_.-]*?)*?))?\\.(fastq|fq)(\\.gz)?$", | ||
| "" # Once replacing with capturing groups is supported, replace with group 3 | ||
| ) | ||
| ) |
tools/bwa.wdl
Outdated
| Int disk_size_gb = (ceil((input_fastq_size + reference_size) * 2) + 10 + modify_disk_size_gb | ||
| ) |
There was a problem hiding this comment.
This is a really unfortunate line break.
| --java-options "-XX:GCTimeLimit=50 -XX:GCHeapFreeLimit=10 -Xms4000m -Xmx~{ | ||
| java_heap_size | ||
| }g" \ |
There was a problem hiding this comment.
This reads awkwardly to me with the line breaks.
tools/kraken2.wdl
Outdated
| Int disk_size_gb = ((if library_name == "bacteria" then 300 else if library_name == "nr" | ||
| then 600 else if library_name == "nt" then 2500 else 25) + modify_disk_size_gb) |
| Int num = (if merge_num > 0 then probe_num + (merge_num * max_length) else probe_num | ||
| ) |
There was a problem hiding this comment.
This is also an awkward break.
| if ((length(kraken_fastas) > 0) || (length(kraken_fasta_urls) > 0) || (length( | ||
| kraken_libraries | ||
| ) > 0)) { | ||
| call kraken2.download_taxonomy { input: | ||
| protein, | ||
| } |
There was a problem hiding this comment.
I wonder if we need to create a priority list of tokens for line breaking. Using this example, I'd prefer to backtrack and line break around || so that the entire clause (length(kraken_libraries) > 0) remains on a single line.
adthrasher
left a comment
There was a problem hiding this comment.
Comments based on the second commit.
| Int disk_size_gb = (ceil((input_fastq_size + reference_size) * 2) + 10 + modify_disk_size_gb | ||
| ) | ||
| ) |
There was a problem hiding this comment.
Removing the indents is good. It'd be great to avoid dangling closures though.
tools/star.wdl
Outdated
| --clip3pAdapterMMp ~{clip_3p_adapter_mmp.left} ~{(if (length(read_twos) != 0) | ||
| then clip_3p_adapter_mmp.right else None)} \ | ||
| then clip_3p_adapter_mmp.right | ||
| else None)} \ |
| ~{if mark_duplicates then "" else "-u"} \ | ||
| ~{if report_additional_columns then "-X" else ""} \ | ||
| ~{if fill_gaps then "-I" else ""} | ||
| ~{if mark_duplicates | ||
| then "" | ||
| else "-u" | ||
| } \ | ||
| ~{if report_additional_columns | ||
| then "-X" | ||
| else "" | ||
| } \ | ||
| ~{if fill_gaps | ||
| then "-I" | ||
| else "" | ||
| } |
There was a problem hiding this comment.
I was worried about this change being too awkward for short clauses, but I think even this one looks pretty good here
There was a problem hiding this comment.
Agreed. I think this is OK even for these short clauses and statements that could be single lines.
| ]))} \ | ||
| --clip3pAdapterSeq "~{clip_3p_adapter_seq.left}" ~{(if (length(read_twos) != 0 | ||
| ) then "'" + clip_3p_adapter_seq.right + "'" else "")} \ | ||
| --clip3pAdapterSeq "~{clip_3p_adapter_seq.left}" ~{(if (length(read_twos) |
There was a problem hiding this comment.
It looks like this line got an extra level of indent.
There was a problem hiding this comment.
huh. That's a strange one. I don't have an immediate answer as to how this happened
There was a problem hiding this comment.
oop. I did something that broke idempotency. There are extra indents being added each time I run this code 😅 This appears to be the only odd case in this commit, but I'm seeing some others locally
There was a problem hiding this comment.
I think there was another instance down a few lines, but it sounds like you've got the cause figured out already.
Describe the problem or feature in addition to a link to the issues.
Before submitting this PR, please make sure:
scripts/ordocker/directories, please ensure any image versions have been incremented accordingly!