sudo mysqld_safe --skip-grant-tables & #在密码错误的情况下安全登录mysql并且修改密码
mysql -u root
>>
USE mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root' AND Host='localhost';
FLUSH PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
FLUSH PRIVILEGES;
安装mysql之后忘记密码了,查看用户,重置密码,加入pasa的用户和密码。
mysql> SELECT User, Host FROM mysql.user;
+------------------+-----------+
| User | Host |
+------------------+-----------+
| debian-sys-maint | localhost |
| mysql.infoschema | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+------------------+-----------+
5 rows in set (0.00 sec)
mysql> CREATE USER 'pasa'@'localhost' IDENTIFIED BY '123456';
#创建了pasa'@'localhost' IDENTIFIED BY '123456'
CREATE USER 'xfm'@'localhost' IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON *.* TO 'xfm'@'localhost';
FLUSH PRIVILEGES;
####创建了xfm@localhost,密码123456
SELECT User, Host FROM mysql.user;
+------------------+-----------+
| User | Host |
+------------------+-----------+
| debian-sys-maint | localhost |
| mysql.infoschema | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| pasa | localhost |
| root | localhost |
| xfm | localhost |
+------------------+-----------+
7 rows in set (0.00 sec)
#现在一共有7个用户。pasa需要用到pasa@localhost
#退出mysql的安全模式,使用普通模式登陆
ps aux | grep mysqld_safe
sudo kill $mysqld_safe num
#重启mysql服务器
sudo systemctl restart mysql
top
#可看到mysql重新启用,可使用各用户登陆查看
现在已经配置好mysql的用户和密码,可以进入下一步,去除污染序列。
#下载UniVec数据库,运行seqclean# 可查看 https://cloud.tencent.com/developer/article/1607173
seqclean jy.pasa/trinity_jy_out.Trinity-GG.fasta -c 10 -n 10000 -v Univec.fa
Sequences analyzed: 143767
-----------------------------------
valid: 143765 (9314 trimmed)
trashed: 2
**************************************************
----= Trashing summary =------
by 'shortq': 1
by 'dust': 1
------------------------------
Output file containing only valid and trimmed sequences: trinity_jy_out.Trinity-GG.fasta.clean
For trimming and trashing details see cleaning report : trinity_jy_out.Trinity-GG.fasta.cln
#trinity_jy_out.Trinity-GG.fasta.clean文件可以作为后续使用的序列文件
alignAssembly.config可将PASApipeline-master下的配置文件复制过来修改。
Launch_PASA_pipeline.pl -c alignAssembly.config -C -r -R -g ../jy.fasta/jyyy.fasta -T -t jy.pasa/trinity_jy_out.Trinity-GG.fasta.clean -u jy.pasa/trinity_jy_out.Trinity-GG.fasta --CPU 8 --ALIGNERS blat,minimap2 --TRANSDECODER --MAX_INTRON_LENGTH 1000000
注意有个报错,如果在config文件中使用相对路径,很有可能报错找不到conf文件,而且mysql服务也不会被使用。
(PASA) xfm@xfm-MetaCube:~/bio_data/04.PASA$ Launch_PASA_pipeline.pl -c alignAssembly.config -C -r -R -g ../jy.fasta/jyyy.fasta -T -t jy.pasa/trinity_jy
_out.Trinity-GG.fasta.clean -u jy.pasa/trinity_jy_out.Trinity-GG.fasta --CPU 8 --ALIGNERS blat,minimap2 --TRANSDECODER --MAX_INTRON_LENGTH 1000000
-connecting to MySQL db: jy_pasa
-*** Running PASA pipeine:
* [Wed Dec 4 13:06:31 2024] Running CMD: /home/xfm/miniconda3/envs/PASA/opt/pasa-2.5.3/scripts/create_mysql_cdnaassembly_db.dbi -c alignAssembly.config -S '/home/xfm/miniconda3/envs/PASA/opt/pasa-2.5.3/schema/cdna_alignment_mysqlschema' -r
ERROR, cannot find conf file /home/xfm/miniconda3/envs/PASA/opt/pasa-2.5.3/pasa_conf/conf.txt
BEGIN failed--compilation aborted at /home/xfm/miniconda3/envs/PASA/opt/pasa-2.5.3/PerlLib/Pasa_conf.pm line 39.
C
解决办法:
修改配置文件,把config中database的路径改为 绝对路径_pasa