-
Notifications
You must be signed in to change notification settings - Fork 52
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
What is wrong with this "else if" statement? #108
Comments
We did not make a new github release after adding else if. reflow0.6.8 was
made in August. Let me get that going.
…On Mon, Feb 25, 2019 at 12:11 PM Olga Botvinnik ***@***.***> wrote:
Hello,
I'm trying to write a workflow that executes the following logic:
1. If method == "minhash", run sourmash.CompareFastqs
2. Else If molecule == "protein" --> fail because only sourmash
supports "protein"
3. Else If method == "hyperloglog", run dashing.CompareFastqs with distance
:= "dist"
4. Else If method == "truejaccard", run dashing.CompareFastqs with distance
:= "truejaccard"
5. Fail because the method and molecule are not supported.
Constructing this conditional has been tricky so far. Here's the relevant
code snippet:
val matrix = if method == "minhash" {
sourmash.CompareFastqs(reads, names, molecule, log2_sketch_size, ksize, threads)
} else if molecule == "protein" {
panic("Molecule 'protein' is currently only supported by 'minhash' "+
"method, not 'hyperloglog' or 'truejaccard'")
} else if method == "hyperloglog" {
distance := "dist"
dashing.CompareFastqs(reads, names, log2_sketch_size, ksize, threads, distance)
} else if method == "truejaccard" {
distance := "setdist"
dashing.CompareFastqs(reads, names, log2_sketch_size, ksize, threads, distance)
} else {
panic("Method '" + method + "' is not currenly supported. Please "+
"use either 'minhash', 'hyperloglog', or 'truejaccard'")
}
And here's the error:
(base)
✘ Mon 25 Feb - 12:05 ~/code/kmer-hashing/reflow origin ☊ olgabot/dashing ↑2 15☀ 1●
reflow doc compare_fastqs.rf
compare_fastqs.rf:60:12: syntax error: unexpected tokIf, expecting '{'
(this is the } else if molecule == "protein" { line)
[image: screen shot 2019-02-25 at 12 10 40 pm]
<https://user-images.githubusercontent.com/806256/53365562-6b9be580-38f6-11e9-8c40-6f26b66830c5.png>
Can you spot the error? It seems like it should be really simple but my
eyes just don't catch it.
Warmest,
Olga
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#108>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AfC0Q0XBbma_Ouim32yii-sA8zENBsGlks5vREN1gaJpZM4bQsE9>
.
--
This email message, including attachments, may contain private,
proprietary, or privileged information and is the confidential information
and/or property of GRAIL, Inc., and is for the sole use of the intended
recipient(s). Any unauthorized review, use, disclosure or distribution is
strictly prohibited. If you are not the intended recipient, please contact
the sender by reply email and destroy all copies of the original message.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm trying to write a workflow that executes the following logic:
method == "minhash"
, runsourmash.CompareFastqs
molecule == "protein"
--> fail because only sourmash supports "protein"method == "hyperloglog"
, rundashing.CompareFastqs
withdistance := "dist"
method == "truejaccard"
, rundashing.CompareFastqs
withdistance := "truejaccard"
Constructing this conditional has been tricky so far. Here's the relevant code snippet:
And here's the error:
(this is the
} else if molecule == "protein" {
line)Can you spot the error? It seems like it should be really simple but my eyes just don't catch it.
Warmest,
Olga
The text was updated successfully, but these errors were encountered: