mckennalab / FlashFry

FlashFry: The rapid CRISPR target site characterization tool
Other
63 stars 10 forks source link

Re-opening: Bedfile command line argument wgEncodeBroadHmmGm12878HMM.bed doesn't contain both a name and a file #15Jun 25, 2020 #40

Closed nkuperwasser closed 3 months ago

nkuperwasser commented 3 months ago

Hello,

Per request, I am re-opening this issue when using the bedannotator flag when doing the scoring. I get the error:

Exception in thread "main" java.lang.AssertionError: assertion failed: Bedfile command line argument /Users/nkuperwasser/sandbox/wgEncodeBroadHmmGm12878HMM.bed doesn't contain both a name and a file

This file came straight from the test data folder, and I have had the same issue with other bed files.

Here is the rest of the exception:

at scala.Predef$.assert(Predef.scala:219)
at scoring.BedAnnotation.$anonfun$setup$1(BedAnnotation.scala:131)
at scoring.BedAnnotation.$anonfun$setup$1$adapted(BedAnnotation.scala:130)
at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:32)
at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:29)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:193)
at scoring.BedAnnotation.setup(BedAnnotation.scala:130)
at modules.ScoreResults.$anonfun$run$2(ScoreResults.scala:115)
at modules.ScoreResults.$anonfun$run$2$adapted(ScoreResults.scala:101)
at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:32)
at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:29)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:193)
at modules.ScoreResults.run(ScoreResults.scala:101)
at picocli.CommandLine.execute(CommandLine.java:1048)
at picocli.CommandLine.access$900(CommandLine.java:142)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1255)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1223)
at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1131)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:1414)
at picocli.CommandLine.parseWithHandler(CommandLine.java:1353)
at main.scala.Main$.main(Main.scala:57)
at main.scala.Main.main(Main.scala)

Here is the full command:

java -Xmx16g -jar ~/FlashFry/FlashFry-assembly-1.15.jar score --input D34.guides --output D34.scored --scoringMetrics doench2016cfd,dangerous,hsu2013,minot,bedannotator --database ~/FlashFry/db/mm39/mm39ngg --inputAnnotationBed ~/genomes/mm39/mm39_bed.fry --transformPositions unc93b1_D34.bed

I have been using my own mm39_bed.fry and used the wgEncodeBroadHmmGm12878HMM.bed to test if there was an issue with my bed file...but doesn't see to be the case.

Thank you in advance!

aaronmck commented 3 months ago

Hi @nkuperwasser,

I think the error is telling you to have a name and a file, separated with a comma. So something like myBedFileName,bedfile.bed instead of just bedfile.bed. Let me know if that fixes it.

-Aaron

nkuperwasser commented 3 months ago

Hello, thanks for the quick response. Unfortunately, that did not work. Tried placing the name either before or after (separated by the comma), but keep getting the same error. I also tried having the bed file in the same fold to make things easier thinking that there could have been some issues with the tilde character, but to no avail.

In the grand scheme of things, the software is great and I can manage without the bedannotator function, but it would be nice...:)

Sincerely,

NK

aaronmck commented 3 months ago

hmmm, that error comes from the code that tries to parse the bedfile name and file path. Could you try making the path absolute, like:

--inputAnnotationBed nkuperwassersBedFileName,/full/path/to/my/bed/genomes/mm39/mm39_bed.fry

and see if that fixes it? We're probably not handling this right, and the command line can't do the automatic replacement when we use the name,file style.

nkuperwasser commented 3 months ago

Unfortunately, doesn't do the trick...even when it's in the same folder (I mistyped earlier), still has the same problem.

Also, for full information:

I'm running Monterey on M1 iMac $ java --version java 13.0.2 2020-01-14 Java(TM) SE Runtime Environment (build 13.0.2+8) Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

Thanks again.

nkuperwasser commented 3 months ago

Okay!! After going through the various files, I found the solution, especially after reading this comment:

description = Array("the bed file to annotate overlapping targets with in the format name:bedfile"))

Basically, the format is name:bedfile (a name separated with : and not a comma)

got it to work with : --inputAnnotationBed mybefile:mm39_bed.fry

Thanks!!

NK

aaronmck commented 3 months ago

oh lord... yeah I'll fix the documentation / error message. Thanks for digging into this.

nkuperwasser commented 3 months ago

Thank you for the software and the opportunity!

NK

On Jun12 2024, at 18:07, Aaron McKenna @.***> wrote:

oh lord... yeah I'll fix the documentation / error message. Thanks for digging into this.

— Reply to this email directly, view it on GitHub https://github.com/mckennalab/FlashFry/issues/40#issuecomment-2163419631, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEUITWZKKUZINXY3HW27VD3ZHBW2JAVCNFSM6AAAAABJCIYWPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRTGQYTSNRTGE. You are receiving this because you modified the open/close state.