Recent Posts

Pages: 1 ... 4 5 [6] 7 8 9
51
General Discussion / Re: Error when generating logos in PDF format
« Last post by xiangjun on November 15, 2017, 11:09:40 pm »
As a followup, the REDUCE Suite has been updated to v2.2.4-2017nov16. The LogoGenerator bug for PDF output has been fixed. The obsolete GIF output has been removed to avoid a dependency on the convert program from ImageMagick. The default PNG format is the choice for use with HTMLSummary-generated webpage. The LogoGenerator documentation has been also revised.

Some examples:

Code: Ruby
  1. # By default, the output is in PNG format
  2. LogoGenerator -file=$REDUCE_SUITE/data/formats/psam_ex.dat -logo=sample.png
  3. # Using the -format=pdf option for PDF output
  4. LogoGenerator -file=$REDUCE_SUITE/data/formats/psam_ex.dat -logo=sample.pdf -format=pdf
  5. # Output in the raw EPS format with -format=eps
  6. LogoGenerator -file=$REDUCE_SUITE/data/formats/psam_ex.dat -logo=sample.eps -format=eps

The LogoGenerator utility in the REDUCE Suite is a general purpose, robust logo generator of DNA or RNA base sequences. It creates a logo in the vector EPS format, which can be easily converted to other vector or raster image format using numerous third-party tools. Internally, LogoGenerator takes advantage of the widely available gs program (Ghostscript).

It is worth noting that on Mac OS X, the preview program can directly read LogoGenerator-created EPS file and convert it to PDF format. On Linux and Windows, the situation should be similar.

Xiang-Jun
52
General Discussion / Re: Error when generating logos in PDF format
« Last post by xiangjun on November 15, 2017, 07:04:41 pm »
Hi Harmen,

Thanks for your quick feedback.

I'll update the software code with 'gif' output removed, but keep the PDF option. A new release will be made available on the download page late tonight.

Best regards,

Xiang-Jun

53
General Discussion / Re: Error when generating logos in PDF format
« Last post by hjb2004 on November 15, 2017, 06:56:27 pm »
Hi Xiang-Jun,

PDF support seems important to keep, and removing the option "-dTextAlphaBits=4" from config/pkg_settings.cfg completely solved the problem for me for this format, so I can continue with what I was doing now.

However, I agree that it will be best to discontinue GIF support. On my Mac at least, "convert" is not installed by default, and indeed GIF generation with "-format=gif" does not work:

$ LogoGenerator -file=results/psam_001.xml -format=gif
sh: line 6: convert: command not found
system('gs -sOutputFile=- \
   -sDEVICE=png16m \
   -dDEVICEWIDTHPOINTS=340 \
   -dDEVICEHEIGHTPOINTS=213 \
   -q -r96 -dSAFER -dBATCH -dNOPAUSE \
   ./temp_logo.eps \
   | convert png:- ./psam_001.gif
') returns nonzero (32512)


Thanks for the quick response!

Harmen
54
General Discussion / Re: Error when generating logos in PDF format
« Last post by xiangjun on November 15, 2017, 06:07:43 pm »
Hi Harmen,

Thanks for posting on the Forum!

Yes, I can reproduce the error message with regard to generating the logos in PDF format. It is indeed due to the Ghostscript "-dTextAlphaBits=4" option you reported. I am using Ghostscript 9.21.

I remember taking the "-dTextAlphaBits=4" option from reading on the docs/examples somewhere. Now that we know the problem, we have the following options to go:

  • Simply remove the "-dTextAlphaBits=4" option from the system call.
  • Or we can remove the support of the PDF output format (from the documentation).

While we are here, I'd also want to remove the largely out-of-date GIF output format. By doing so, we also get rid of the dependency on the convert from ImageMagick.

What's your take? Please let me know, and I will update and code for a new release late tonight (or tomorrow).

Xiang-Jun
55
General Discussion / Error when generating logos in PDF format
« Last post by hjb2004 on November 15, 2017, 05:36:00 pm »
Hi Xiang-Jun,

When I run these commands:

cd examples/MatrixREDUCE/spellman-alpha
sh commandline.sh
LogoGenerator -file=results/psam_001.xml -format=pdf

I get the following error:

GPL Ghostscript 9.19:

  ERROR:
    Can't set GraphicsAlphaBits or TextAlphaBits with a vector device.
Unrecoverable error: rangecheck in .putdeviceprops
system('gs -sOutputFile=./psam_001.pdf \
   -sDEVICE=pdfwrite \
   -dPDFSETTINGS=/printer \
   -dEmbedAllFonts=true \
   -dDEVICEWIDTHPOINTS=340 \
   -dDEVICEHEIGHTPOINTS=213 \
   -q -r96 -dTextAlphaBits=4 -dSAFER -dBATCH -dNOPAUSE \
   ./temp_logo.eps
') returns nonzero (65280)

The error seems to be triggered by the "-dTextAlphaBits=4" option. When I run "gs" manually without it, it work fine.

Seems that this is a known problem with more recent versions of "gs". I use version 9.19 on a Mac OS 10.11.6.

Thanks,
Harmen
56
General Discussion / Re: Affinity score calculation
« Last post by JonathanCan on September 11, 2017, 02:29:30 am »
Hi!

Can you explain how D-Bal works is calculated (in what range)?

thanks!

Thanks for explaining Xiang-Jun!
57
Documentation / Re: Set up the REDUCE Suite
« Last post by xiangjun on June 19, 2017, 04:39:58 pm »
Hi Rahul,

Thanks for your feedback. Step #5 should work as is if step #4 has been performed as advertised, which adds the bin/ directory to PATH. I've slightly refined the instruction for step #4 to make it clearer.

Executing 'bin/MatrixREDUCE -h' assumes one is at the $REDUCE_SUITE root directory.

Xiang-Jun
58
Documentation / Re: Set up the REDUCE Suite
« Last post by rrdutta on June 19, 2017, 04:33:00 pm »
Hello all,

On step 5 of REDUCE_Suite_setup, try executing 'bin/MatrixREDUCE -h' in the REDUCE-Suite-v2.2 directory if entering 'MatrixREDUCE' into the command line does not work after you have switched into the 'bin' directory.

Cheers,

Rahul
59
General Discussion / Re: Affinity score calculation
« Last post by xiangjun on January 05, 2017, 01:30:05 pm »
Hi,

Thanks for using the REDUCE Suite and for posting your question(s) on the Forum.

The concept of affinity in the REDUCE Suite is simple, but technical. As is often the case, the idea can be best illustrated with a concrete example.

Let's suppose we have a PSAM (sample-psam.xml) as shown below:

Code: [Select]
<matrix_reduce>

<directionality>forward</directionality>
<psam_length>6</psam_length>

<psam>
# A            C            G            T
# +============+============+============+=======
  1            0.25         0.1          0.1   #1
  0.1          0.5          0.2          1     #2
  0.1          1            0.1          0.1   #3
  1            0.1          0.6          0.1   #4
  0.2          0.6          1            0.1   #5
  0.1          0.1          1            0.3   #6
</psam>
</matrix_reduce>

And a short base sequence (sample-seq.txt) as below:

Code: [Select]
>sample
GTCATGGT

Since the PSAM has a length of 6, and the single sequence has 8 bases, there are three sliding windows, as detailed below:

Code: [Select]
w1: GTCATG      --- affinity of w1: 0.1 * 1 * 1 * 0.1 * 1 * 1 = 0.01
w2:   TCATGG    --- affinity of w2: 0.1 * 0.5 * 0.1 * 0.1 * 1 * 1 = 0.0005
w3:     CATGGT  --- affinity of w3: 0.2 * 0.1 * 0.1 * 0.6 * 1 * 0.3 = 0.00045
---- sum of affinity = 0.01095

If you run:
Code: [Select]
AffinityProfile -seq=sample-seq.txt -psam=sample-psam.xml
you will find the following content in the default output file seq_psam.dat:
Code: [Select]
        sample-psam.xml
sample  0.01095

There are quite a few variations for the calculation of affinity in AffinityProfile, but the above example covers the essence. Since the REDUCE Suite is open source, you can and are encouraged to dive into the details.

Hope this helps,

Xiang-Jun

60
General Discussion / Affinity score calculation
« Last post by kubranarci on January 05, 2017, 02:55:20 am »
Hi!

Can you explain how the the result of AffinityProbe is calculated (in what range)?

thanks!
Pages: 1 ... 4 5 [6] 7 8 9
Created and maintained by Dr. Xiang-Jun Lu [律祥俊]. See also http://forum.x3dna.org and http://x3dna.org