Troubleshootings

I can’t compile CRAC because of libhts, what can I do?

  • If libhts is installed on your computer and if you have the following error when compiling CRAC:

    crac: error while loading shared libraries: libhts.so.1: cannot open shared object file: No such file or directory

    This is because you don’t have the correct version installed. Please install libhts1 and not the version 0 of libhts.

  • If you can only install libhts locally, you may have trouble compiling CRAC. Please try launching the configure script as is:

    CXXFLAGS=-Ipath_to_htslib/include/ LDFLAGS=-Lpath_to_htslib/lib/ ./configure

    where you should replace path_to_htslib with the path to where libhts is installed.

  • If you still encounter problems compiling CRAC, send us an email and we will able to send you a statically-compiled version of CRAC.

Why does freebayes crash on BAM CRAC file?

Some tools like freebayes require a RG_NAME in the SAM header (@RG ID:mygroup SM:mysample).

You must add the @RG fields in the SAM CRAC file by using this program or samtools program.

Additional filters

Despite the description of  examples in the documentation, several scenarios require a very specific use of CRAC. That is why we propose in this tutorial some additional filters (or wrapper) for adjusting certain problems.

In fact, Cufflinks needs XS field for splices but we do not know why.  Thus, we need to:

  1. add XS optional field to the SAM file generated by CRAC,
  2. and SAM file must also be sorted.

This AWK command includes the whole process:

awk -F'\t' 'BEGIN{OFS="\t"} $6 ~ /N/ {xs="XS:A:"; if (and($2, 16) > 0) {xs=xs"-"} else {xs=xs"+"}; $(NF+1)=xs}' file.sam | sort -k 3,3 -k 4,4n > file.cufflinks.sam