Running an Event calculus logic program - events

I am a beginner in logic programming, when I try to run my logic program using event calculus with Clingo solver, i use this command:
clingo -c maxtime=1 -n 0 dec.lp exemple.lp | format-output 1
I face this error :
exemple.lp:2:5-14: error: syntax error, unexpected <IDENTIFIER>
*** ERROR: (clingo): parsing failed
Can someone explain to me what should i do before running the example to avoid this error.

Related

How to generate flamegraphs from macOS process samples?

Anyone have a clean process for converting samples on macOS to FlameGraphs?
After a bit of fiddling I thought I could perhaps use a tool such as flamegraph-sample, but it seems to give me some trouble and so I thought perhaps there may be other more up-to-date options that I'm missing insomuch that this tool gives an error:
$ sudo sample PID -file ~/tmp/sample.txt -fullPaths 1
Sampling process 198 for 1 second with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Sample analysis of process 35264 written to file ~/tmp/sample.txt
$ python stackcollapse-sample.py ~/tmp/sample.txt > ~/tmp/sample_collapsed.txt
$ flamegraph.pl ~/tmp/sample_collapsed.txt > ~/tmp/sample_collapsed_flamegraph.svg
Ignored 2335 lines with invalid format
ERROR: No stack counts found

XSB Runtime errors - MulVal

I'm trying to convert an Nessus scan xml file to MulVal input using a given conversion script and get the following runtime errors:
Error[XSB/Runtime/P]: [Permission (Operation) redefine on imported predicate: lists : member / 2] in compile/1
Error[XSB/Runtime/P]: [Existence (No procedure usermod : vulProperty / 3 exists)]
..and a few more similar 'no procedure usermod : ...' errors
I haven't worked with XSB/Prolog before so if anyone has any idea whats going on or if you want to see some of the source code please let me know

How can I figure out how many threads cut needs in Snakemake rule?

I use cut in one rule of my pipeline and always throws an error, but without any error description.
When I try this command with a simple bash script it is working without any errors.
Here is the rule:
rule convert_bamheader:
input: bam/SERUM-ACT/exon_tagged_trimmed_mapped_cleaned.bam, stats/SERUM-ACT/good_barcodes_clean_filter.txt
output: bam/SERUM-ACT/exon_tagged_trimmed_mapped_cleaned_header.txt, bam/SERUM-ACT/exon_tagged_trimmed_mapped_cleaned_header_filtered.tsv
jobid: 15
wildcards: sample=SERUM-ACT
threads: 4
mkdir -p stats/SERUM-ACT
mkdir -p log/SERUM-ACT
samtools view bam/SERUM-ACT/exon_tagged_trimmed_mapped_cleaned.bam > bam/SERUM-ACT/exon_tagged_trimmed_mapped_cleaned_header.txt
cut -f 12,13,18,20-24 bam/SERUM-ACT/exon_tagged_trimmed_mapped_cleaned_header.txt | grep -f stats/SERUM-ACT/good_barcodes_clean_filter.txt > bam/SERUM-ACT/exon_tagged_trimmed_mapped_cleaned_header_filtered.tsv
Submitted DRMAA job 15 with external jobid 7027806.
Error in rule convert_bamheader:
jobid: 15
output: bam/SERUM-ACT/exon_tagged_trimmed_mapped_cleaned_header.txt, bam/SERUM-ACT/exon_tagged_trimmed_mapped_cleaned_header_filtered.tsv
ClusterJobException in line 256 of */pipeline.snake:
Error executing rule convert_bamheader on cluster (jobid: 15, external: 7027806, jobscript: */.snakemake/tmp.ewej7q4e/snakejob.convert_bamheader.15.sh). For detailed error see the cluster log.
Job failed, going on with independent jobs.
Exiting because a job execution failed. Look above for error message
Complete log: */.snakemake/log/2018-12-18T104741.092698.snakemake.log
I thought that it has to do something with the number of threads provided and number of threads needed for the cut step, but I am not sure.
Perhaps someone can help me?
Cheers!

Syntax highlight for Stdout and Stderr

I'm developing an application that runs some shell commands, and I want to print the shell output in my web app in a pretty way. I tried some syntax highlighters, but it doesn't recognize the colors or break lines for example.
Here is an output example:
FAIL tmp/jest_client/0052ba7f-1c68-4f16-924f-5d44fa0ea415.test.js (5.511s)↵ some↵ ✕ returns 2 (3ms)↵↵ ● some › returns 2↵↵ ReferenceError: some is not defined↵ ↵ at Object.<anonymous> (tmp/jest_client/0052ba7f-1c68-4f16-924f-5d44fa0ea415.test.js:5:11)↵↵Test Suites: 1 failed, 1 total↵Tests: 1 failed, 1 total↵Snapshots: 0 total↵Time: 13.869s↵Ran all test suites matching /tmp/jest_client/0052ba7f-1c68-4f16-924f-5d44fa0ea415.test.js/i.↵
Thaks for your help!
To solve this problem, I used the aha Linux package.

H-PoPG Haplotyper NullPointerException Error at algorithms.HBOP2Builder

Hello I am building a genome assembly method and a critical step of my pipeline is phasing. I've been searching through different methods and recently discovered H-PoPG which looks promising for polyploid haplotyping. I am trying to test my data on it but I got the following result and couldn't find any help or forum on the web.
This is the command I am using:
java -jar H-PoPG.jar -p 3 -w 0.9 -f fragment_matrix_Chrm1 -vcf PilonChrm1.vcf -o output_phased_Chrm1
This is the error message:
Exception in thread "main" java.lang.NullPointerException
at algorithms.HBOP2Builder.<init>(HBOP2Builder.java:59)
at algorithms.HBOP2Builder.<init>(HBOP2Builder.java:25)
at algorithms.HPBOP2Alg.buildHaplotype(HPBOP2Alg.java:24)
at main.PolyPlotyping.Polyphasing(PolyPlotyping.java:224)
at main.PolyPlotyping.go(PolyPlotyping.java:159)
at main.PolyPlotyping.main(PolyPlotyping.java:280)
srun: error: neumann: task 0: Exited with exit code 1
Could anyone point me in the right direction by explaining me where this error could come from?
Many Thanks
I have run your data and found it is OK to run the command without the vcf file.
The error messages occur when it is run with the vcf file.
The vcf file contains many overlaps such as:
Chromosome_1_Reference 16 . A . 1486 LowCov DP=39;TD=43;BQ=38;MQ=57;QD=38;BC=39,0,0,0;QP=100,0,0,0;PC=119;IC=0;DC=0;XC=0;AC=0;AF=0.00 GT 0/0
Chromosome_1_Reference 16 . AAACCC A . Amb;LowCov DP=56;TD=60;BQ=39;MQ=57;QD=25;BC=19,21,0,0;QP=48,52,0,0;PC=119;IC=0;DC=16;XC=1;AC=1;AF=0.29 GT 0/1
Chromosome_1_Reference 17 . A C 1018 Amb;LowCov DP=56;TD=60;BQ=39;MQ=57;QD=25;BC=19,21,0,0;QP=48,52,0,0;PC=119;IC=0;DC=16;XC=1;AC=1;AF=0.52 GT 0/1
Please check the vcf file and ensure that every SNP position is covered by only one line,
and that the last column of each line should be 0/0/1 or 0/1/1 when the polyploidy is 3 (-p 3).

Resources