Skip to content
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

interactive formatting results in some (nearly) unreadable text #541

Closed
mathog opened this issue Jun 23, 2020 · 2 comments
Closed

interactive formatting results in some (nearly) unreadable text #541

mathog opened this issue Jun 23, 2020 · 2 comments
Labels
fixed in develop this bug has been fixed in develop and the issue will be closed when merged into master

Comments

@mathog
Copy link

mathog commented Jun 23, 2020

salmon built 6/23/2020 on CentOS 8 from devel branch using:

  pversion=1.2.1d
  package=salmon
  TOPDIR=/usr/common/modules/el8/x86_64/software/${package}/${pversion}-CentOS-vanilla
  THELUA=/usr/common/modules/el8/x86_64/modules/all/${package}/${pversion}-CentOS-vanilla.lua
  cd /usr/common/src
  git clone -b develop https://github.com/COMBINE-lab/salmon.git
  mv ${package} ${package}-${pversion}
  cd ${package}-${pversion}
  cp CMakeLists.txt CMakeLists.txt.dist
  cat >mypatch <<'EOD'
--- CMakeLists.txt.dist	2020-04-21 22:31:07.000000000 -0700
+++ CMakeLists.txt	2020-06-09 14:55:02.733885772 -0700
@@ -419,6 +419,10 @@
 find_package(Boost 1.59.0 COMPONENTS iostreams filesystem system timer chrono program_options)
 message("BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}")
 message("BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}")
+message("Forcing Boost_FOUND to TRUE")
+set(Boost_FOUND TRUE)
+set(Boost_LIBRARY_DIRS "/usr/lib64/boost169")
+set(Boost_LIBRARIES -lboost_iostreams -lboost_filesystem -lboost_system -lboost_timer -lboost_chrono -lboost_program_options)
 message("Boost_FOUND = ${Boost_FOUND}")
 endif()
 
EOD
  patch -p0 <mypatch
  module load cmake
  module load io_lib
  module load libgff
  module load libtbb
  # module load pufferfish  #ignored even if set
  mkdir build
  cd build
  cmake \
    -DCMAKE_INSTALL_PREFIX=$TOPDIR \
    -DSTADEN_ROOT=$ROOT_IO_LIB \
    -DGFF_ROOT=$ROOT_LIBGFF \
    -DTBB_ROOT=$ROOT_LIBTBB \
    -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
    -DBOOST_LIBRARYDIR=/usr/lib64/boost169 \
    -DBOOST_INCLUDEDIR=/usr/include/boost169 \
    -DBoost_NO_SYSTEM_PATHS=ON \
    .. 2>&1 | tee cmake_2020_06_23.log
  make -j 4 2>&1 | tee build_2020_06_23.log
  make test # both passed
  make install 2>&1 | tee install_2020_06_23.log
  cd ..
  cp sample_data.tgz $TOPDIR
  module_generate_from_directory.sh \
    $package \
    $pversion \
    CentOS/vanilla \
    $TOPDIR \
    "Fast highly-accurate, transcript-level quantification estimates from RNA-seq data." \
    "https://github.com/COMBINE-lab/salmon"

When the following commands are run in an XFCE4 terminal or an uxterm (black text, white background) using the sample data provided in the distribution:

  gunzip -c sample_data.tgz | (cd /tmp; tar -xf -)
  module load salmon
  cd /tmp/sample_data
  salmon index -t transcripts.fasta -i sample_salmon_fmd_index --type puff
  salmon quant -i sample_salmon_fmd_index \
    -l IU \
    -1 reads_1.fastq -2 reads_2.fastq \
    -o sample_salmon_fmd_quant

the output line:

[2020-06-23 13:58:50.657] [jointLog] [warning] Only 10000 fragments were mapped, but the number of burn-in fragments was set to 5000000.
The effective lengths have been computed using the observed mappings.

is emitted in yellow. Yellow on white is nearly impossible to read. The rest of the text is black (as it should be). If the final command is instead:

salmon quant -i sample_salmon_fmd_index \
    -l IU \
    -1 reads_1.fastq -2 reads_2.fastq \
    -o sample_salmon_fmd_quant >/tmp/sq.log 2>&1


There are no embedded control codes in the sq.log file.

Changing the terminal to white text on black background also results in that line being colored yellow. Yellow on black is easy enough to read.

I understand that normally this is run in a script and not interactively, but some highlight color other than yellow should be used on light backgrounds. Yellow may result in some way from default settings on CentOS 8, but I have no recollection of having seen another application do this in the several months I have been using this machine. Honestly, I do not see any real advantage in coloring the text at all since the lines are already marked with [info] or [warning] tags, so turning off whatever this coloring is would be fine, I think, for most people.

@rob-p
Copy link
Collaborator

rob-p commented Jun 23, 2020

We can find another color that is more terminal background agnostic. We actually find the colors useful during development and debugging (plus they look pretty), so I'm a bit reticent to remove them completely. I think they are chosen by the spdlog library by default, but are modifiable.

@rob-p rob-p added the fixed in develop this bug has been fixed in develop and the issue will be closed when merged into master label Jun 27, 2020
@rob-p
Copy link
Collaborator

rob-p commented Jun 27, 2020

Thanks @mathog : I've chosen another color that is readable on both light and dark backgrounds. These changes are on develop and will make it into the next release.

@rob-p rob-p closed this as completed Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in develop this bug has been fixed in develop and the issue will be closed when merged into master
Projects
None yet
Development

No branches or pull requests

2 participants