SeqCode: Set-Up

Downloading SeqCode: Files and Folders

SeqCode source code is entirely written in ANSI C. The latest full distribution release can be downloaded from GitHub:


This is the current list of archives and folders:

  • README:
    General description of the software and basic instructions to run SeqCode in your computer.
  • LICENSE:
    Open software license (GPL version 3.0).
  • Makefile:
    List of rules to make the binaries of SeqoCode applications.
  • bin/:
    Binary files to execute SeqCode applications.
  • include/:
    Headers and basic definitions for the source code.
  • objects/:
    Objects resulting from the make compilation.
  • tests/:
    Perl scripts to test the SeqCode binaries were successfully generated with real examples.
  • src/:
    SeqCode and SAMtools (BCFtools and HTSlib) source code.

SeqCode integrates the source code of the SAMTools in C to read SAM/BAM files (which includes the BCFtools, the SAMtools and the HTSlib).

How To Install SeqCode

Please, run the Makefile for automatically generating the SAMtools libraries and the SeqCode binaries. Type 'make all' to generate SeqCode:

> make all
***** Step 1. Building the CRAM library           *****
gcc  -c -I./include -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 ./src/cram/cram_codecs.c -o ./objects/cram/cram_codecs.o
(...)
***** [OK] CRAM library sucessfully generated     *****

***** Step 2. Building the HTSLIB library         *****
gcc  -c -I./include -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 ./src/htslib/bgzf.c -o ./objects/htslib/bgzf.o
(...)
***** [OK] HTSLIB library sucessfully generated   *****

***** Step 3. Building the SAMTOOLS library       *****
gcc  -c -I./include -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 ./src/samtools/bam_aux.c -o ./objects/samtools/bam_aux.o
(...)
***** [OK] SAMTOOLS library sucessfully generated *****

***** Step 4. Building the SeqCode suite          *****
gcc  -c -I./include -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 ./src/seqcode/buildChIPprofile.c -o ./objects/seqcode/buildChIPprofile.o (...)
***** [OK] SeqCode suite successfully generated   *****

This is the full content of a successful compilation instance:


Depending on the user platform, some warning messages on the pthread library could be visualized when compiling the SAMtools. These messages can be safely skipped, not affecting the SeqCode binaries. It is possible to delete previous SeqCode binaries by typing 'make clean'.

This is the list of binaries provided into the bin/ folder which can be copied in the running path of your computer:

> ls bin/
buildChIPprofile
combineChIPprofiles
combineTSSmaps
combineTSSplots
computemaxsignal
findPeaks
genomeDistribution
matchpeaks
matchpeaksgenes
processmacs
produceGENEmaps
produceGENEplots
producePEAKmaps
producePEAKplots
produceTESmaps
produceTESplots
produceTSSmaps
produceTSSplots
recoverChIPlevels
scorePhastCons

Testing SeqCode: scripts, inputs and outputs

The tests/ folder contain a series of Perl scripts to test the correct functioning of each SeqCode command:

>ls tests/
inputs
outputs
test_buildChIPprofile.pl
test_combineChIPprofiles.pl
test_combineTSSplots.pl
test_findPeaks.pl
test_genomeDistribution.pl
test_matchpeaksgenes.pl
test_matchpeaks.pl
test_produceGENEmaps.pl
test_produceGENEplots.pl
test_producePEAKmaps.pl
test_producePEAKplots.pl
test_produceTSSmaps.pl
test_produceTSSplots.pl
test_recoverChIPlevels.pl

Each test can be executed with the option -v to see the messages of basic information:

./tests/test_produceTSSmaps.pl -v

%%%% Starting SeqCode test for the produceTSSmaps tool by Enrique Blanco (Sun Aug 18 12:18:42 CEST 2019)

%%%% Stage 0.  Reading options	[DONE]

%%%% Stage 1.  Running the test for H3K4me3 --chr10-- in mESC (default plot)
%%%% bin/produceTSSmaps  tests/inputs/ChromInfo.txt tests/inputs/refGene.txt tests/inputs/H3K4me3_chr10.bam tests/inputs/genes_chr10.txt test_1 5000	[DONE]

%%%% Stage 2.  Running the test for H3K4me3 --chr10-- in mESC (lower resolution)
%%%% bin/produceTSSmaps  -w 1000 tests/inputs/ChromInfo.txt tests/inputs/refGene.txt tests/inputs/H3K4me3_chr10.bam tests/inputs/genes_chr10.txt test_2 5000	[DONE]

%%%% Stage 3.  Running the test for H3K4me3 --chr10-- in mESC (one gene, default plot)
%%%% bin/produceTSSmaps  tests/inputs/ChromInfo.txt tests/inputs/refGene.txt tests/inputs/H3K4me3_chr10.bam tests/inputs/10genes.txt test_3 5000	[DONE]

%%%% Stage 4.  Running the test for H3K4me3 --chr10-- in mESC (another color scheme)
%%%% bin/produceTSSmaps  -b black -B black -H black -f darkgoldenrod1 -F darkgoldenrod1 tests/inputs/ChromInfo.txt tests/inputs/refGene.txt tests/inputs/H3K4me3_chr10.bam tests/inputs/genes_chr10.txt test_4 5000	[DONE]

%%%% Stage 5.  Running the test for H3K4me3 --chr10-- in mESC (noise reduction plot)
%%%% bin/produceTSSmaps  -t 0 tests/inputs/ChromInfo.txt tests/inputs/refGene.txt tests/inputs/H3K4me3_chr10.bam tests/inputs/genes_chr10.txt test_5 5000	[DONE]

%%%% Stage 6.  Running the test for H3K4me3 --chr10-- in mESC (noise reduction plot 2)
%%%% bin/produceTSSmaps  -t 2 tests/inputs/ChromInfo.txt tests/inputs/refGene.txt tests/inputs/H3K4me3_chr10.bam tests/inputs/genes_chr10.txt test_6 5000	[DONE]

%%%% Stage 7.  Running the test for H3 --chr10-- in mESC (default plot)
%%%% bin/produceTSSmaps  tests/inputs/ChromInfo.txt tests/inputs/refGene.txt tests/inputs/H3_chr10.bam tests/inputs/genes_chr10.txt test_7 5000	[DONE]

%%%% R CMD BATCH tests/inputs/Rscript_produceTSSmaps.txt	[DONE]

%%%% Stage 7.  Finishing the test (produceTSSmaps)
%%%% Checking output file 1: tests/outputs/produceTSSmaps/test_1_TSSmap_5000/PlotHEATmap_test_1_5000.pdf	[OK]
%%%% Checking output file 2: tests/outputs/produceTSSmaps/test_2_TSSmap_5000/PlotHEATmap_test_2_5000.pdf	[OK]
%%%% Checking output file 3: tests/outputs/produceTSSmaps/test_3_TSSmap_5000/PlotHEATmap_test_3_5000.pdf	[OK]
%%%% Checking output file 4: tests/outputs/produceTSSmaps/test_4_TSSmap_5000/PlotHEATmap_test_4_5000.pdf	[OK]
%%%% Checking output file 5: tests/outputs/produceTSSmaps/test_5_TSSmap_5000/PlotHEATmap_test_5_5000.pdf	[OK]
%%%% Checking output file 6: tests/outputs/produceTSSmaps/test_6_TSSmap_5000/PlotHEATmap_test_6_5000.pdf	[OK]
%%%% Checking output file 7: tests/outputs/produceTSSmaps/test_7_TSSmap_5000/PlotHEATmap_test_7_5000.pdf	[OK]
%%%% Checking output file 7 (2): tests/outputs/produceTSSmaps/produceTSS2maps.pdf	[DONE]

%%%% Total running time (hours): 0.012  hours
%%%% Total running time (minutes): 0.766  mins
%%%% Total running time (seconds): 46  secs
%%%% Successful termination:	[DONE]

To see the full verbose information of each SeqCode command, please use the option -w.


The input folder contains the original files employed throughout the test routines:

> ls tests/inputs

10genes.txt
ChromInfo.txt
genes_chr10.txt
H3_chr10.bam
H3K27me3_chr10.bed
H3K27me3_mESC.bed
H3K4me3_chr10.bam
H3K4me3_chr10.bed
H3K4me3_mESC.bed
onegene.txt
onepeak.bed
refGene_chr10.bed
refGene.txt
Rscript_combineTSSplots.txt
Rscript_produceGENEmaps.txt
Rscript_produceGENEplots.txt
Rscript_producePEAKmaps.txt
Rscript_producePEAKplots.txt
Rscript_produceTSSmaps.txt
Rscript_produceTSSplots.txt
Rscript_recoverChIPlevels.txt

The output folder contains the resulting output files generated in the tests:

> ls tests/outputs

buildChIPprofile
combineChIPprofiles
combineTSSplots
findPeaks
genomeDistribution
matchpeaks
matchpeaksgenes
produceGENEmaps
produceGENEplots
producePEAKmaps
producePEAKplots
produceTSSmaps
produceTSSplots
recoverChIPlevels

For each SeqCode command, users can check the resulting output of the tests:

> ls tests/outputs/produceTSSmaps

produceTSS2maps.pdf
test_1_TSSmap_5000
test_2_TSSmap_5000
test_3_TSSmap_5000
test_4_TSSmap_5000
test_5_TSSmap_5000
test_6_TSSmap_5000
test_7_TSSmap_5000

This is the panel of resulting plots for the test of the produceTSSmaps function:

TEST 1TEST 2TEST 3TEST 4
TEST 5TEST 6TEST 7TEST 7B