今天,66大顺。祝大家科研顺利,万事顺心!
psass用的人不多,所以觉得说不定可以分享一个文章,说不定有人感兴趣。
psass前几日安装一直不顺,没想到今日直接装成功了,都不带卡的,过分。
直接安装的方法如下,优选。
conda activate bioinfo
conda install -c bioconda psass # 从Bioconda渠道安装
which psass # 验证路径
这个方法呢,本是首选,但是前面怎么都刷新不出来,无奈选择了下面的github方法,结果更是进坑了,
拔了两天,还是上面这样搞定了。
之前一直没搞定的如下:
通过github安装后make,无穷无尽的错误,最后弃用,采用上面的搞定
# Clone the repository
git clone https://github.com/RomainFeron/PSASS.git
# Navigate to the PSASS directory
cd psass
# Build PSASS
make
例如
psass安装上,
(bioinfo) [adm@localhost PSASS]$ make
g++ -Wall -std=c++11 -I ./include -c -o build/analyze.o src/analyze.cpp
src/analyze.cpp: 在构造函数‘Psass::Psass(Parameters&)’中:
src/analyze.cpp:13:26: 错误:使用了被删除的函数‘OutputHandler& OutputHandler::operator=(OutputHandler&&)’
this->output_handler = OutputHandler(this->parameters);
^
In file included from src/analyze.h:16:0,
from src/analyze.cpp:1:
src/output_handler.h:30:7: 附注:‘OutputHandler& OutputHandler::operator=(OutputHandler&&)’ is implicitly deleted because the default definition would be ill-formed:
class OutputHandler {
^
src/output_handler.h:30:7: 错误:使用了被删除的函数‘std::basic_ofstream<char>& std::basic_ofstream<char>::operator=(const std::basic_ofstream<char>&)’
In file included from ./include/CLI11/CLI11.hpp:45:0,
from src/arg_parser.h:4,
from src/analyze.h:11,
from src/analyze.cpp:1:
/usr/include/c++/4.8.2/fstream:599:11: 附注:‘std::basic_ofstream<char>& std::basic_ofstream<char>::operator=(const std::basic_ofstream<char>&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_ofstream : public basic_ostream<_CharT,_Traits>
^
/usr/include/c++/4.8.2/fstream:599:11: 错误:使用了被删除的函数‘std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&)’
In file included from /usr/include/c++/4.8.2/iterator:64:0,
from src/analyze.h:6,
from src/analyze.cpp:1:
/usr/include/c++/4.8.2/ostream:58:11: 附注:‘std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_ostream : virtual public basic_ios<_CharT, _Traits>
^
/usr/include/c++/4.8.2/ostream:58:11: 错误:使用了被删除的函数‘std::basic_ios<char>& std::basic_ios<char>::operator=(const std::basic_ios<char>&)’
In file included from /usr/include/c++/4.8.2/ios:44:0,
from /usr/include/c++/4.8.2/ostream:38,
from /usr/include/c++/4.8.2/iterator:64,
from src/analyze.h:6,
from src/analyze.cpp:1:
/usr/include/c++/4.8.2/bits/basic_ios.h:66:11: 附注:‘std::basic_ios<char>& std::basic_ios<char>::operator=(const std::basic_ios<char>&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_ios : public ios_base
^
In file included from /usr/include/c++/4.8.2/ios:42:0,
from /usr/include/c++/4.8.2/ostream:38,
from /usr/include/c++/4.8.2/iterator:64,
from src/analyze.h:6,
from src/analyze.cpp:1:
/usr/include/c++/4.8.2/bits/ios_base.h:789:5: 错误:‘std::ios_base& std::ios_base::operator=(const std::ios_base&)’是私有的
operator=(const ios_base&);
^
In file included from /usr/include/c++/4.8.2/ios:44:0,
from /usr/include/c++/4.8.2/ostream:38,
from /usr/include/c++/4.8.2/iterator:64,
from src/analyze.h:6,
from src/analyze.cpp:1:
/usr/include/c++/4.8.2/bits/basic_ios.h:66:11: 错误:在此上下文中
class basic_ios : public ios_base
^
In file included from ./include/CLI11/CLI11.hpp:45:0,
from src/arg_parser.h:4,
from src/analyze.h:11,
from src/analyze.cpp:1:
/usr/include/c++/4.8.2/fstream:599:11: 错误:使用了被删除的函数‘std::basic_filebuf<char>& std::basic_filebuf<char>::operator=(const std::basic_filebuf<char>&)’
class basic_ofstream : public basic_ostream<_CharT,_Traits>
^
/usr/include/c++/4.8.2/fstream:72:11: 附注:‘std::basic_filebuf<char>& std::basic_filebuf<char>::operator=(const std::basic_filebuf<char>&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_filebuf : public basic_streambuf<_CharT, _Traits>
^
In file included from /usr/include/c++/4.8.2/ios:43:0,
from /usr/include/c++/4.8.2/ostream:38,
from /usr/include/c++/4.8.2/iterator:64,
from src/analyze.h:6,
from src/analyze.cpp:1:
/usr/include/c++/4.8.2/streambuf:810:7: 错误:‘std::basic_streambuf<_CharT, _Traits>& std::basic_streambuf<_CharT, _Traits>::operator=(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]’是私有的
operator=(const basic_streambuf& __sb)
^
In file included from ./include/CLI11/CLI11.hpp:45:0,
from src/arg_parser.h:4,
from src/analyze.h:11,
from src/analyze.cpp:1:
/usr/include/c++/4.8.2/fstream:72:11: 错误:在此上下文中
class basic_filebuf : public basic_streambuf<_CharT, _Traits>
^
In file included from src/analyze.h:16:0,
from src/analyze.cpp:1:
src/output_handler.h:30:7: 错误:使用了被删除的函数‘std::basic_ofstream<char>& std::basic_ofstream<char>::operator=(const std::basic_ofstream<char>&)’
class OutputHandler {
^
src/output_handler.h:30:7: 错误:使用了被删除的函数‘std::basic_ofstream<char>& std::basic_ofstream<char>::operator=(const std::basic_ofstream<char>&)’
src/output_handler.h:30:7: 错误:使用了被删除的函数‘std::basic_ofstream<char>& std::basic_ofstream<char>::operator=(const std::basic_ofstream<char>&)’
make: *** [build/analyze.o] 错误 1
(bioinfo) [adm@localhost PSASS]$
改了这里改那里,最后还是没用。
还有就是我用的是win10 22H2 专业工作站版, 用hyper-V装了虚拟机centos来用,用bwa20核比对貌似没啥问题。但是转bam格式时候,只要用多核,半小时一个小时就报错。
samtools view 只要加了-@就不行。
后续解决方法就是去掉多核这部分选项,去掉-@参数,最简单的参数,慢慢跑就好了。
另外,发现samtools不用先用view 将sam转bam,然后sort。它的sort可以直接操作sam文件,所以可以用一行命令,直接将sam 转为sort好的bam,省心。
samtools有时候也喜欢极简生活。
samtools sort -T "${OUTPUT_SORTED_dir}/tmp" -o "${OUTPUT_SORTED_dir}${SAMPLE}.sorted.bam" "${OUTPUT_DIR}${SAMPLE}.sam"