#install fastp (clean data)
source ~/.bashrc_gcc-4.9.3
#install zlib 1.2.8
tar -zxf zlib-1.2.8.tar.gz
cd zlib-1.2.8/
./configure --prefix=/opt/sysoft/zlib-1.2.8
make -j 16
make install
echo 'export CPLUS_INCLUDE_PATH=/opt/sysoft/zlib-1.2.8/include/:$CPLUS_INCLUDE_PATH' >> ~/.bashrc_zlib-1.2.8
echo 'export C_INCLUDE_PATH=/opt/sysoft/zlib-1.2.8/include/:$C_INCLUDE_PATH' >> ~/.bashrc_zlib-1.2.8
echo 'export LIBRARY_PATH=/opt/sysoft/zlib-1.2.8/lib/:$LIBRARY_PATH' >> ~/.bashrc_zlib-1.2.8
echo 'export LD_LIBRARY_PATH=/opt/sysoft/zlib-1.2.8/lib/:$LD_LIBRARY_PATH' >> ~/.bashrc_zlib-1.2.8
echo 'export PKG_CONFIG_PATH=/opt/sysoft/zlib-1.2.8/lib/pkgconfig/:$PKG_CONFIG_PATH' >> ~/.bashrc_zlib-1.2.8
source ~/.bashrc_zlib-1.2.8
tar -zxf /home/train/software/fastp-0.20.0.tar.gz -C /opt/biosoft/
cd /opt/biosoft/fastp-0.20.0/
cp Makefile Makefile.bak
#若遇到如下报错,(if have some error like these)
#fastqreader.cpp:32: undefined reference to gzoffset' ./obj/peprocessor.o: In function PairEndProcessor::initOutput()':
#peprocessor.cpp:35: undefined reference to gzbuffer' peprocessor.cpp:38: undefined reference to gzbuffer'
perl -i -e 'while(<>){$_ =~ s/LIBS\ \:\=\ \-lz\ \-lpthread/LIBS\ \:\=\ \-L\/usr\/local\/lib\ \-L\/usr\/local\/include\ \-L\/opt\/sysoft\/zlib\-1\.2\.8\/include\ \-L\/opt\/sysoft\/zlib\-1\.2\.8\/lib\ \-lz\ \-lpthread/g;print $_;}' Makefile
#source ~/.bashrc_gcc-4.9.3
make
echo 'export PATH=$PATH:/opt/biosoft/fastp-0.20.0/' >> ~/.bashrc_fastp
echo 'source ~/.bashrc_gcc-4.9.3' >> ~/.bashrc_fastp
echo 'source ~/.bashrc_zlib-1.2.8' >> ~/.bashrc_fastp
source ~/.bashrc_fastp