<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[刘茜]]></title><description><![CDATA[个人成员的博客文章]]></description><link>http://an.forum.genostack.com/category/3</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 09:29:00 GMT</lastBuildDate><atom:link href="http://an.forum.genostack.com/category/3.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Oct 2025 08:15:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[tmp]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://an.forum.genostack.com/uid/3">@ice-melt</a><br />
ENV=prod<br />
GS_PLATFORM_ADMIN_USER=anneng<br />
GS_PLATFORM_URL=http://192.168.30.202:30000</p>
<p dir="auto">RAG_EMBEDDING_MODEL=/models/huggingface/hub/models--sentence-transformers--all-MiniLM-L6-v2/snapshots/44eb4044493a3c34bc6d7faae1a71ec76665ebc6<br />
OLLAMA_BASE_URL=http://192.168.30.218:11434<br />
OLLAMA_BASE_URLA=http://192.168.30.218:11434<br />
OLLAMA_BASE_URLS=http://192.168.30.218:11434</p>
<p dir="auto">LOCAL_DATA_FOLDER=/app/backend/load_data<br />
RAG_EMBEDDING_MODEL=nomic-embed-text<br />
RAG_SIMILARITY_TOP_K=2<br />
RAG_RERANK_ENABLED=<br />
RAG_RERANK_MODEL=cross-encoder/ms-marco-MiniLM-L-2-v2<br />
RAG_RERANK_TOP_N=1<br />
RAG_TOKENIZER=/models/cache/models--mistralai--Mistral-7B-Instruct-v0.2<br />
PG_HOST=postgres.genostack-base.svc.cluster.local<br />
PG_PORT=5432<br />
PG_USER=postgres<br />
PG_DATABASE=qiime<br />
PG_PASSWORD=anneng%401235_Jike2015<br />
PG_SCHEMA_NAME=ling_an</p>
]]></description><link>http://an.forum.genostack.com/topic/1129/tmp</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/1129/tmp</guid><dc:creator><![CDATA[zhanglu]]></dc:creator><pubDate>Mon, 13 Oct 2025 08:15:44 GMT</pubDate></item><item><title><![CDATA[对于已经存在的项目迁移到新git中,操作参考]]></title><description><![CDATA[<h2>1. 将新 git repo 的仓库地址添加到 git remote中</h2>
<p dir="auto">-- git remote add {remote名称} {新git repo的仓库地址}<br />
<code>git remote add git135 http://192.168.0.135:30080/genostack-app/ms-monocle2.git</code></p>
<h2>2. 将代码及注释信息都上传</h2>
<p dir="auto"><code>git push --set-upstream git135 master</code></p>
<p dir="auto">此时 git push 会同时提交两个仓库,<br />
只往一个仓库提交 使用 git push {remote名称} 即可</p>
<h2>3. (可选)恢复remote</h2>
<pre><code>git remote rm origin
git remote add origin http://192.168.0.135:30080/genostack-app/ms-monocle2.git
git remote rm git135
</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/987/对于已经存在的项目迁移到新git中-操作参考</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/987/对于已经存在的项目迁移到新git中-操作参考</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Wed, 23 Aug 2023 03:42:36 GMT</pubDate></item><item><title><![CDATA[[吉凯]关于项目环境搭建]]></title><description><![CDATA[<p dir="auto"><a href="http://an.forum.genostack.com/topic/952/%E5%90%89%E5%87%AF-%E5%85%B3%E4%BA%8E%E6%A8%A1%E6%9D%BF%E9%A1%B9%E7%9B%AE%E7%9A%84%E8%AF%B4%E6%98%8E">返回</a></p>
<h1>项目环境搭建</h1>
<h2>1. 创建 conda 环境</h2>
<p dir="auto">推荐使用 <code>conda</code> 进行环境的隔离,安装时使用mamba安装 速度比较快</p>
<pre><code class="language-bash">
ENV_NAME="设置对应项目的环境名称" # 建议项目名和环境名相同

# 统一使用py3.10版本，可以根据项目的不同使用其他的版本，
# 这里展示大部分项目环境的初始化过程，仅供参考
mamba create -n ${ENV_NAME} python=3.10 -y 
mamba activate ${ENV_NAME}
mamba install r-base=4.3 nodejs=18 -y
# r-base 4.3.0, nodejs 18.16.1
# 没有R的依赖可不安装r-base;  nodejs用于前端项目, 全局安装 nodejs 时此处可不安装
</code></pre>
<h2>2. 安装前端依赖</h2>
<pre><code class="language-bash"># 前端需要的全局依赖 vue 脚手架(5.0.8版本)
# 这里我安装到对应项目目录下，可根据情况全局安装（增加 -g 参数）
npm i @vue/cli -g 

# 安装前端项目依赖
npm i

# 后台使用的是打包后的文件
npm run build
</code></pre>
<h2>3. 安装后端依赖</h2>
<pre><code># 安装必要的全局依赖
pip install -r docs/docker_base_v01/requirements.txt

# 根据项目使用包的情况安装必要依赖
conda install r-xxx -c conda-forge -y
pip install -r requirements.txt

# 安装公共sdk工具包,安装指定版本
pip install ms-jk-utils=x.x.x
</code></pre>
<h1>问题记录</h1>
<h2>1. 如果遇到 notarget No matching version found for @babel/parser@^7.22.7. 错误</h2>
<p dir="auto">检查 nodejs <code>&gt;16.20</code> ，npm <code>&gt;9.6.6</code> , vue <code>5.0.8</code> 版本，<br />
检查 镜像地址是否修改为 私服镜像 <code>npm config set registry=http://registry.npmjs.org</code></p>
]]></description><link>http://an.forum.genostack.com/topic/957/吉凯-关于项目环境搭建</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/957/吉凯-关于项目环境搭建</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Fri, 07 Jul 2023 03:34:27 GMT</pubDate></item><item><title><![CDATA[[吉凯]通用帮助包sdk相关说明]]></title><description><![CDATA[<h1>通用帮助包sdk相关说明</h1>
<h2>配置私服下载sdk包</h2>
<pre><code class="language-bash">pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set global.extra-index-url https://repository.genostack.com/repository/pypi-group/simple
pip install ms-jk-utils==1.0.9
</code></pre>
<blockquote>
<p dir="auto">项目最好指定具体的版本， 本安装包尽可能以向下兼容的方式开发升级</p>
</blockquote>
<h2>项目反射注入的接口说明</h2>
<h3>1. sample</h3>
<h3>2. submit</h3>
<h3>3. download</h3>
<h3>4. read_file</h3>
<h3>5. get_params</h3>
<h3>6. upload_file</h3>
<h3>7. upload_files</h3>
<h3>8. get_template_config</h3>
<pre><code>        mod.bp.route("/sample", methods=['POST'])(sample)
        mod.bp.route("/submit", methods=['POST'])(submit)
        mod.bp.route("/download", methods=['POST'])(download)
        mod.bp.route("/read_file", methods=['POST'])(read_file)
        mod.bp.route("/get_params", methods=['POST'])(get_params)
        mod.bp.route("/upload_file", methods=['POST'])(upload_file)
        mod.bp.route("/upload_files", methods=['POST'])(upload_files)
        mod.bp.route("/get_template_config", methods=['POST'])(get_template_config)
</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/955/吉凯-通用帮助包sdk相关说明</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/955/吉凯-通用帮助包sdk相关说明</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Thu, 06 Jul 2023 10:45:07 GMT</pubDate></item><item><title><![CDATA[[吉凯]上传文件微服务]]></title><description><![CDATA[<h2>上传文件微服务</h2>
<p dir="auto">本文档用来记录上传服务项目内容</p>
<h2>配置文件参考</h2>
<p dir="auto"><code>instance/config.py</code></p>
<pre><code class="language-python">PORT = 5000
# 该配置为服务器上规划的一个文件夹目录
PLATFORM_DATA_DIR = "/home/lx/services/public_data"
</code></pre>
<blockquote>
<p dir="auto">Note: 在镜像启动时需要使用 -v 将<code>PLATFORM_DATA_DIR</code> 配置的路径1：1映射进来<br />
且其他微服务也需要映射该目录</p>
</blockquote>
<blockquote>
<p dir="auto">Note: 上传微服务使用的端口需要记住，其他项目中需要通过配置 <code>UPLOAD_API_URL = f"http://172.17.0.1:5041/api_upload"</code> 来使用该服务，这里使用docker的网段</p>
</blockquote>
]]></description><link>http://an.forum.genostack.com/topic/954/吉凯-上传文件微服务</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/954/吉凯-上传文件微服务</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Thu, 06 Jul 2023 10:35:53 GMT</pubDate></item><item><title><![CDATA[[吉凯]关于项目视图的说明]]></title><description><![CDATA[<p dir="auto"><a href="http://an.forum.genostack.com/topic/952/%E5%90%89%E5%87%AF-%E5%85%B3%E4%BA%8E%E6%A8%A1%E6%9D%BF%E9%A1%B9%E7%9B%AE%E7%9A%84%E8%AF%B4%E6%98%8E">返回</a></p>
<h2>关于视图的详细说明</h2>
<h4>1.</h4>
<p dir="auto">项目视图必须位于项目 <code>app/views</code> 下</p>
<h4>2.</h4>
<p dir="auto">视图的识别规则有两种</p>
<ol>
<li>识别 <code>app/views</code> 目录下的package中的<code>bp</code>对象<br />
目录结构如下：</li>
</ol>
<pre><code class="language-bash">app/views
├── __init__.py
├── ms_jk
│   ├── bubble.py
│   ├── get_col_list.py
└─└── __init__.py # &lt;= 此文件中的bp对象会识别为蓝图对象,且路由前缀为 ms_jk (目录包名)
</code></pre>
<p dir="auto"><code>__init__.py</code> 中代码示例如下</p>
<pre><code class="language-python">from flask import Blueprint

bp = Blueprint('views_bp', __name__)

from .bubble import bubble
from .get_col_list import get_col_list
</code></pre>
<ol start="2">
<li>识别 <code>app/views</code> 目录下的py文件中的<code>bp</code>对象<br />
目录结构如下：</li>
</ol>
<pre><code class="language-bash">app/views
├── __init__.py
└── ms_jk .py # &lt;= 此文件中的bp对象会识别为蓝图对象,且路由前缀为 ms_jk (文件名)
</code></pre>
<p dir="auto"><code>ms_jk .py</code> 中代码示例如下</p>
<pre><code class="language-python">from flask import Blueprint

bp = Blueprint('view_name', __name__) # 视图名称可以随意填写，但是多个视图名称不能重复

@bp.route("/bubble", methods=['POST'])
def bubble():
    pass
    return {"status":200}
</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/953/吉凯-关于项目视图的说明</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/953/吉凯-关于项目视图的说明</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Thu, 06 Jul 2023 10:31:12 GMT</pubDate></item><item><title><![CDATA[[吉凯]关于模板项目的说明]]></title><description><![CDATA[<h1>关于模板项目的说明</h1>
<ul>
<li>
<p dir="auto"><a href="http://an.forum.genostack.com/topic/951/%E5%90%89%E5%87%AF-%E9%A1%B9%E7%9B%AE%E5%88%9D%E5%A7%8B%E5%8C%96%E4%BB%A3%E7%A0%81%E5%8F%82%E8%80%83">吉凯项目初始化代码参考</a></p>
</li>
<li>
<p dir="auto"><a href="http://an.forum.genostack.com/topic/953/%E5%90%89%E5%87%AF-%E5%85%B3%E4%BA%8E%E9%A1%B9%E7%9B%AE%E8%A7%86%E5%9B%BE%E7%9A%84%E8%AF%B4%E6%98%8E">关于项目视图的说明</a></p>
</li>
<li>
<p dir="auto"><a href="http://an.forum.genostack.com/topic/957/%E5%90%89%E5%87%AF-%E5%85%B3%E4%BA%8E%E9%A1%B9%E7%9B%AE%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA">[吉凯]关于项目环境搭建</a></p>
</li>
</ul>
<p dir="auto">模板配置文件示例参考：</p>
<blockquote>
<p dir="auto">这是气泡图的参考配置，仅供参考<br />
<a href="/assets/uploads/files/1688709973473-frontend_template_config_1.json">frontend_template_config_1.json</a><br />
<a href="/assets/uploads/files/1688709983327-frontend_template_config_2.json">frontend_template_config_2.json</a><br />
则是前端各组件配置项的参考<br />
<a href="/assets/uploads/files/1688710071725-input.json">input.json</a><br />
关于配置文件有两个相关的配置项<br />
FRONTEND_TEMPLATE_CONFIG_1 = "frontend_template_config_1.json"  # 前端左侧模板参数json文件名<br />
FRONTEND_TEMPLATE_CONFIG_2 = "frontend_template_config_2.json"  # 前端右侧模板参数json文件名<br />
该配置为默认识别的文件名称，需要修改的话可以再config.py中覆盖</p>
</blockquote>
]]></description><link>http://an.forum.genostack.com/topic/952/吉凯-关于模板项目的说明</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/952/吉凯-关于模板项目的说明</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Thu, 06 Jul 2023 09:55:00 GMT</pubDate></item><item><title><![CDATA[[吉凯]项目初始化代码参考]]></title><description><![CDATA[<p dir="auto"><a href="http://an.forum.genostack.com/topic/952/%E5%90%89%E5%87%AF-%E5%85%B3%E4%BA%8E%E6%A8%A1%E6%9D%BF%E9%A1%B9%E7%9B%AE%E7%9A%84%E8%AF%B4%E6%98%8E">返回</a></p>
<h1><code>app/__init__.py</code>代码中涉及的需求汇总</h1>
<ul>
<li>动态注册蓝图</li>
<li>一些参数有默认的配置</li>
<li>增加version的识别（可优化）</li>
<li>增加对前端 <code>/tool_detail</code> 路由的支持</li>
</ul>
<pre><code class="language-python">#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
@Author     : ice-melt@outlook.com
@File       : __init__.py.py
@Time       : 2022/09/21
@Version    : 1.0
@Desc       : None
"""
import importlib
import logging
import os
from app.utils import Paths
from ms_jk_utils.web import blueprints_dynamic_register
from ms_jk_utils.cfg import DefaultConfig
from flask_cors import CORS
from flask import Flask, g, render_template

__VERSION = (1, 0, 0)
__VERSION__ = ".".join(map(lambda x: str(x), __VERSION))


def create_app():
    app = Flask(__name__,
                static_folder="../dist/static",
                template_folder="../dist",
                instance_path=Paths.instance_path)

    print(app.instance_path)
    print(app.static_folder)
    print(app.template_folder)
    # r'/*' 是通配符，让本服务器所有的URL 都允许跨域请求
    CORS(app, resources=r'/*')

    app.config.from_object(DefaultConfig)
    app.config.from_pyfile(os.path.join(app.instance_path, 'config.py'))
    app.config["version"] = __VERSION__
    blueprints_dynamic_register(os.path.dirname(__file__), app)

    # views_bp.before_request(check_ticket)
    # r'/*' 是通配符，让本服务器所有的URL 都允许跨域请求
    CORS(app, resources=r'/*')

    @app.route('/', methods=['GET'])
    def index():
        return render_template('index.html')

    @app.route('/tool_detail', methods=['GET'])
    def tool_detail():
        return render_template('index.html')
    # @app.route('/static', methods=['GET'])
    # def static():
    #     return render_template('index.html')
    return app

</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/951/吉凯-项目初始化代码参考</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/951/吉凯-项目初始化代码参考</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Thu, 06 Jul 2023 09:49:51 GMT</pubDate></item><item><title><![CDATA[虚拟机磁盘空间不足]]></title><description><![CDATA[<h2>1.  首先修改虚拟硬盘的大小</h2>
<p dir="auto">找到VirtualBox的安装目录: <code>C:\Program Files\Oracle\VirtualBox\VBoxManage.exe</code><br />
找到虚拟机对应的虚拟硬盘: <code>D:\VirtualBox VMs\ubuntu22.04_desktop\ubuntu22.04_desktop-disk002.vdi</code><br />
在cmd中运行命令: <code>VBoxManage.exe modifyhd "D:\VirtualBox VMs\ubuntu22.04_desktop\ubuntu22.04_desktop-disk002.vdi"   --resize 358400</code></p>
<p dir="auto">358400单位是M,合计350G. 修改操作需要关闭虚拟机</p>
<h2>2.启动虚拟机划分磁盘控件</h2>
<ol>
<li>安装分区管理软件 <code>sudo apt-get  install gparted</code></li>
<li>打开软件, 进行操作</li>
</ol>
<p dir="auto">不推荐直接unmount根目录,但这样无法操作划分磁盘控件<br />
我直接unmount根目录,此时有个提示,但是锁消失了,直接将额外的空间分配过来</p>
]]></description><link>http://an.forum.genostack.com/topic/944/虚拟机磁盘空间不足</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/944/虚拟机磁盘空间不足</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Wed, 05 Jul 2023 02:43:18 GMT</pubDate></item><item><title><![CDATA[flask 接口返回 json 中 key值被排序的问题]]></title><description><![CDATA[<h1>flask 接口返回 json 中 key值被排序的问题</h1>
<h2>方法一:</h2>
<pre><code class="language-python"># flask启动时,增加配置项
JSON_SORT_KEYS = False

# 然后正常返回
return jsonify({"a":"aa","z":"zz","b":"bb"})
</code></pre>
<h2>方法二:</h2>
<pre><code class="language-python">
# 使用 Response 返回
return Response(json.dumps(res), mimetype="application/json")
</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/936/flask-接口返回-json-中-key值被排序的问题</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/936/flask-接口返回-json-中-key值被排序的问题</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Fri, 30 Jun 2023 08:38:34 GMT</pubDate></item><item><title><![CDATA[使用pysam处理bam文件]]></title><description><![CDATA[<h2>安装依赖</h2>
<p dir="auto"><code>pip install pysam==0.19.1</code></p>
<h2>使用示例及说明</h2>
<pre><code class="language-python"># 读取文件
with pysam.AlignmentFile(file, mode) as reader:
    for r in reader:
        # 可以通过循环遍历bam中的每一行
        print(r) # r中包含很多属性,具体可以通过调试查看
</code></pre>
<p dir="auto"><strong>注意</strong>:</p>
<ul>
<li>当文件为 .bam 文件时, mode= "rb"</li>
<li>当文件为 .sam 文件时, mode= "r"</li>
<li>当文件为 CRAM 文件时, mode= "rc"</li>
</ul>
<pre><code class="language-python"># 当文件包含索引时,可以读取特定区域
for r in reader.fetch('chrM', 300, 310)：
    print(r)
</code></pre>
<pre><code class="language-python"># 获取比对到指定碱基的结果,且碱基质量&gt;30
for pileupcolumn in reader.pileup("chrM", 300, 301):
    for read in [al for al in pileupcolumn.pileups if al.alignment.mapq&gt;30]:
        if not read.is_del and not read.is_refskip:
            if read.alignment.pos + 1 == 301:
                print(read.alignment.reference_name,\
                      read.alignment.pos + 1,\
                    read.alignment.query_sequence[read.query_position])
</code></pre>
<p dir="auto"><strong>注意</strong>:</p>
<ul>
<li>pysam中碱基位置都是从0开始计算</li>
<li>read.alignment与前述r是相同的对象实例</li>
</ul>
]]></description><link>http://an.forum.genostack.com/topic/772/使用pysam处理bam文件</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/772/使用pysam处理bam文件</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Fri, 28 Oct 2022 09:12:18 GMT</pubDate></item><item><title><![CDATA[烟草指纹图谱APP部署]]></title><description><![CDATA[<h1>烟草指纹图谱APP部署</h1>
<ul>
<li>image: anneng01:8090/angs/molecular_genetic_analysis:api_01</li>
<li>volumn: /workspace/angs_molecular_genetic_analysis_api/instance</li>
<li>port: 5667</li>
</ul>
<p dir="auto">完整的启动命令</p>
<pre><code class="language-bash">docker run -d \
-p 5667:5667 \
-v /ceph_disk3/lx/temp/instance:/workspace/angs_molecular_genetic_analysis_api/instance \
anneng01:8090/angs/molecular_genetic_analysis:api_01
</code></pre>
<p dir="auto">备注:</p>
<ol>
<li>instance目录下包含
<ul>
<li><a href="http://config.py" rel="nofollow ugc">config.py</a>: 部署时需要修改内部pg和redis配置</li>
<li>supervisord.conf: 使用归档文件即可</li>
<li>log: 空目录</li>
</ul>
</li>
<li>需要的配置文件参考服务器 /ceph_disk3/lx/temp/instance 下内容</li>
<li>关于镜像tag名称在正式使用时可能会有更新(项目并未完全完成)</li>
</ol>
<p dir="auto">验证:</p>
<ol>
<li>使用服务器内部文件(可在instance目录下放置test_data目录,并将测试数据放入)</li>
</ol>
<p dir="auto">使用post方式请求接口: <code>http://103.114.101.5:5667/load</code><br />
请求参数(json格式):</p>
<pre><code class="language-json">{
    "vcf":"/workspace/angs_molecular_genetic_analysis_api/instance/test_data/n5000.vcf.gz",
    "fasta":"/workspace/angs_molecular_genetic_analysis_api/instance/test_data/Nitab-v4.5_genome_Chr_Edwards2017.fasta"
}
</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/769/烟草指纹图谱app部署</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/769/烟草指纹图谱app部署</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Fri, 30 Sep 2022 03:05:04 GMT</pubDate></item><item><title><![CDATA[下载报错]]></title><description><![CDATA[<p dir="auto">回复: <a href="/topic/566/karken2-%E6%9E%84%E5%BB%BAnt%E5%BA%93">karken2 构建nt库</a></p>
<h3>问题1：</h3>
<p dir="auto"><code>rsync_from_ncbi.pl: unexpected FTP path (new server?) for ...</code></p>
<p dir="auto">参考：<a href="https://github.com/DerrickWood/kraken2/issues/226" rel="nofollow ugc">https://github.com/DerrickWood/kraken2/issues/226</a></p>
<p dir="auto">修改 <code>vim /home/bioinfo/miniconda2/envs/kraken2/libexec/rsync_from_ncbi.pl</code><br />
将 46 行 ftp 改为 https</p>
<pre><code> 46   # if (! ($full_path =~ s#^ftp://${qm_server}${qm_server_path}/##)) {
 46   if (! ($full_path =~ s#^https://${qm_server}${qm_server_path}/##)) {
 47     die "$PROG: unexpected FTP path (new server?) for $ftp_path\n";
 48   }

</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/650/下载报错</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/650/下载报错</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Sat, 14 May 2022 05:40:37 GMT</pubDate></item><item><title><![CDATA[临时修改tmp目录的方法]]></title><description><![CDATA[<h1>Linux临时修改tmp目录</h1>
<p dir="auto">使用qiime2会使用/tmp目录，如果数据过大，tmp目录空间不足可以进行临时修改</p>
<pre><code class="language-bash">export TMPDIR='/ceph_disk3/lx/ws/user_dir_for_bioinfo/qiime_train_classifier/sample/tmp'


qiime feature-classifier fit-classifier-naive-bayes   \
--i-reference-reads ref-seqs.qza   \
--i-reference-taxonomy ref-taxonomy.qza   \
--o-classifier classifier.qza

cd ${TMPDIR}
watch -n 2 ls -l

</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/606/临时修改tmp目录的方法</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/606/临时修改tmp目录的方法</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Fri, 25 Mar 2022 01:43:43 GMT</pubDate></item><item><title><![CDATA[bash 脚本中激活conda环境]]></title><description><![CDATA[<pre><code class="language-bash">
#!/bin/bash
eval "$(conda shell.bash hook)"
conda activate angs_py3-1.0.7
</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/604/bash-脚本中激活conda环境</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/604/bash-脚本中激活conda环境</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Thu, 24 Mar 2022 06:24:39 GMT</pubDate></item><item><title><![CDATA[bash 统计一列数据]]></title><description><![CDATA[<pre><code>cat DNAZ3.m8 |cut -f2 |sort| uniq -c | sort -nr &gt; result.txt
</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/599/bash-统计一列数据</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/599/bash-统计一列数据</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Tue, 22 Mar 2022 06:37:54 GMT</pubDate></item><item><title><![CDATA[lefse安装笔记]]></title><description><![CDATA[<h3>lefse 安装</h3>
<pre><code class="language-bash"># lefse 安装依赖r&gt;3.5和python&gt;3.7环境，这里使用python3.8,r3.5
conda create -n lefse112 -y python=3.8 pip=22.0.4 r-base=3.5
conda activate lefse112
# 使用 conda 安装一直报环境错误，这里使用pip安装
pip install lefse==1.1.2

# 安装依赖的R包
conda install r-survival r-mvtnorm r-modeltools r-coin r-mass -y -c conda-forge
</code></pre>
<h4>环境记录</h4>
<pre><code>~/.condarc
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - defaults

~/.config/pip/pip.conf
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host = mirrors.aliyun.com

# 更新conda
conda update -n base -c defaults conda
</code></pre>
<h4>安装后验证R环境</h4>
<pre><code class="language-bash">(lefse) lx@anneng01[13:45:08]:~$R --version
R version 3.5.1 (2018-07-02) -- "Feather Spray"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-conda_cos6-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.

(lefse) lx@anneng01[13:45:08]:~$R

</code></pre>
<p dir="auto"><strong>报错</strong><br />
<code>/ceph_disk3/lx/miniconda3/envs/lefse/lib/R/bin/exec/R: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory</code></p>
<blockquote>
<p dir="auto">原因：libreadline.so.6 更新了，将7软连到6即可</p>
</blockquote>
<pre><code class="language-bash">cd /lib/x86_64-linux-gnu/
sudo ln -s libreadline.so.7.0 libreadline.so.6
</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/582/lefse安装笔记</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/582/lefse安装笔记</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Wed, 16 Mar 2022 06:04:27 GMT</pubDate></item><item><title><![CDATA[使用rdp数据库构建16s qiime 分类器]]></title><description><![CDATA[<p dir="auto"><a href="https://bioinformaticsworkbook.org/dataAnalysis/Metagenomics/Qiime2.html#gsc.tab=0" rel="nofollow ugc">https://bioinformaticsworkbook.org/dataAnalysis/Metagenomics/Qiime2.html#gsc.tab=0</a></p>
]]></description><link>http://an.forum.genostack.com/topic/581/使用rdp数据库构建16s-qiime-分类器</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/581/使用rdp数据库构建16s-qiime-分类器</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Tue, 15 Mar 2022 09:09:06 GMT</pubDate></item><item><title><![CDATA[16S pipeline]]></title><description><![CDATA[<p dir="auto"><a href="https://schuyler-smith.github.io/16S_amplicon_pipeline/site/index.html" rel="nofollow ugc">https://schuyler-smith.github.io/16S_amplicon_pipeline/site/index.html</a></p>
]]></description><link>http://an.forum.genostack.com/topic/580/16s-pipeline</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/580/16s-pipeline</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Tue, 15 Mar 2022 08:16:57 GMT</pubDate></item><item><title><![CDATA[各类生信相关文件格式解析]]></title><description><![CDATA[<h4>各类生信相关文件格式解析</h4>
<p dir="auto"><a href="https://genome.ucsc.edu/FAQ/FAQformat.html#format1" rel="nofollow ugc">https://genome.ucsc.edu/FAQ/FAQformat.html#format1</a></p>
]]></description><link>http://an.forum.genostack.com/topic/579/各类生信相关文件格式解析</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/579/各类生信相关文件格式解析</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Tue, 15 Mar 2022 06:38:22 GMT</pubDate></item><item><title><![CDATA[AlphaFold2 运行验证]]></title><description><![CDATA[pdb_mmcif 下载特别慢
# 参考网站 https://www.wwpdb.org/ftp/pdb-ftp-sites
# 找到合适的链接下载,比如:
rsync -rlpt -v -z --delete \
rsync.ebi.ac.uk::pub/databases/pdb/data/structures/divided/mmCIF/ \
./mmCIF

# 脚本中给出的信息:
#echo "  * rsync.ebi.ac.uk::pub/databases/pdb/data/structures/divided/mmCIF/ (Europe)"
#echo "  * ftp.pdbj.org::ftp_data/structures/divided/mmCIF/ (Asia)"
#echo "or see https://www.wwpdb.org/ftp/pdb-ftp-sites for more download options."
#rsync --recursive --links --perms --times --compress --info=progress2 --delete --port=33444 \
#  rsync.rcsb.org::ftp_data/structures/divided/mmCIF/ \
#  "${RAW_DIR}"

]]></description><link>http://an.forum.genostack.com/topic/571/alphafold2-运行验证</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/571/alphafold2-运行验证</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Thu, 10 Mar 2022 10:41:45 GMT</pubDate></item><item><title><![CDATA[下载工具说明]]></title><description><![CDATA[<h1>下载工具说明</h1>
<h3>aspera</h3>
<p dir="auto">aspera 使用fasp技术比ftp,http快几百倍，（缺点，必须支持fasp,才能高速下载）</p>
<h3>aria2</h3>
<p dir="auto">关于aria2  介绍：<a href="http://ivo-wang.github.io/2019/04/18/%E5%85%B3%E4%BA%8Earia2%E6%9C%80%E5%AE%8C%E6%95%B4%E7%9A%84%E4%B8%80%E7%AF%87/" rel="nofollow ugc">http://ivo-wang.github.io/2019/04/18/%E5%85%B3%E4%BA%8Earia2%E6%9C%80%E5%AE%8C%E6%95%B4%E7%9A%84%E4%B8%80%E7%AF%87/</a></p>
<p dir="auto">aria2 支持 Http/Https、Ftp、BitTorrent、Metalink 协议（无法解析ed2k://）,设置磁盘缓存、支持断点及分段、多线程、远程服务器登录和上下行限速等不在话下，它甚至能够处理 URL 通配符、从多个地址下载/合并同一文件、加载 Cookie / Header、伪装 User Agent 和允许远程控制等等。</p>
<pre><code class="language-bash"># aria2c -c -s 5 http://example.org/mylinux.iso
-c : 断点续传
-s : 使用线程数
-o: 重命名下载文件

2、Download from 2 sources
# aria2c http://a/f.iso   ftp://b/f.iso

3、Download using 2 connections per host
# aria2c -x2 http://a/f.iso
</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/567/下载工具说明</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/567/下载工具说明</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Wed, 09 Mar 2022 03:48:43 GMT</pubDate></item><item><title><![CDATA[karken2 构建nt库]]></title><description><![CDATA[<p dir="auto">conda install -c conda-forge -c bioconda -c defaults kraken2=2.1.3 -y<br />
<a href="https://stackoverflow.com/questions/72114263/conda-install-package-zlib-conflicts-for-zlibversion-1-2-11-1-3-0a0" rel="nofollow ugc">https://stackoverflow.com/questions/72114263/conda-install-package-zlib-conflicts-for-zlibversion-1-2-11-1-3-0a0</a><br />
包冲突的解决办法</p>
]]></description><link>http://an.forum.genostack.com/topic/566/karken2-构建nt库</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/566/karken2-构建nt库</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Wed, 09 Mar 2022 03:04:42 GMT</pubDate></item><item><title><![CDATA[河南烟草开关机操作]]></title><description><![CDATA[<h1>关机</h1>
<ol>
<li>登录服务器 <code>shutdown -h now</code></li>
<li>按电源关闭存储</li>
</ol>
<h1>开机</h1>
<ol>
<li>先按电源开启存储</li>
<li>按电源开启服务器</li>
</ol>
]]></description><link>http://an.forum.genostack.com/topic/349/河南烟草开关机操作</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/349/河南烟草开关机操作</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Tue, 20 Jul 2021 07:53:33 GMT</pubDate></item><item><title><![CDATA[乌鲁木齐项目落地笔记]]></title><description><![CDATA[<h1>乌鲁木齐项目落地笔记</h1>
<p dir="auto">项目说明：<br />
服务器 OS: Ubuntu 18.04</p>
<h2>问题记录</h2>
<ol>
<li>服务器无法接显示器（缺少VGA线，缺少拥有VGA接口的显示屏），发到客户地的台式PC和显示屏只有HDMI接口，最后向客户临时借用一套显示器解决，建议后续配拥有VGA接口的电脑和显示器，否则最好带上VGA和HDMI互转的设备。</li>
<li>客户地无网络，组局域网服务器与PC无法联通。该问题通过设置服务器ip是PC机网关，服务器网关是PC机ip的方式解决</li>
<li>部署脚本等缺少验证命令或验证方式，如增加权限，开机启动等，命令运行后是否生效不进行验证会增加后续产生问题的几率</li>
</ol>
<h1>问题解决过程涉及的命令</h1>
<ol>
<li>固定网卡名称</li>
</ol>
<pre><code class="language-bash"># 修改Ubuntu内核启动参数,必要时使用sudo权限账号
vim /etc/default/grub
# 将文件中 GRUB_CMDLINE_LINUX="" 修改如下
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

# 更新使生效
update-grub

# 修改网络配置
vim /etc/netplan/50-cloud-init.yaml
# 将文件内容修改如下
network:
    ethernets:
        eth0:
            addresses: [192.168.0.2/24]
            gateway4: 192.168.0.1
            nameservers:
                addresses: [8.8.8.8,114.114.114.114]
    version: 2
# 应用更新并重启
netplan apply
reboot
</code></pre>
<ol start="2">
<li>PC机出现<code>Test Mode</code>水印</li>
</ol>
<pre><code># 管理员启动CMD，该方法尝试无效
bcdedit -set testsigning off

# 修改注册表
# win+R 输入 regedit
# 找到 HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Control/ACPI
# 删除该项

# 以上问题有可能为系统未激活造成
</code></pre>
<h2>后续需求</h2>
<ol>
<li>无网络条件下的系统流程升级或更新（需要提供界面上传补丁包或流程包的方式进行系统或流程的更新和升级）</li>
<li>用户需求的调研与评估</li>
<li>配套电脑需要安装必要的相关软件（ftp工具,浏览器，Excel编辑器等）</li>
</ol>
]]></description><link>http://an.forum.genostack.com/topic/348/乌鲁木齐项目落地笔记</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/348/乌鲁木齐项目落地笔记</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Mon, 19 Jul 2021 10:09:25 GMT</pubDate></item><item><title><![CDATA[MNGS流程开发笔记]]></title><description><![CDATA[<h1>伪代码记录</h1>
<h2>参数</h2>
<pre><code class="language-bash">param_dict={
    {"Asia1":"GCA_008797915.1_ASM879791v1_genomic"}, 
    {"SAT3":"GCA_008798995.1_ASM879899v1_genomic"}, 
    {"SAT2":"GCA_008799015.1_ASM879901v1_genomic"}, 
    {"SAT1":"GCA_008799035.1_ASM879903v1_genomic"}, 
    {"C":"GCA_008799055.1_ASM879905v1_genomic"}, 
    {"A":"GCA_008799075.1_ASM879907v1_genomic"}, 
    {"O":"GCF_002816555.1_ASM281655v1_genomic"},  
}
DB_DIR=/data_raid1/bioinfo/app/cromwell/cromwell-executions/data/database
SampleID=S1
R1=${SampleID}_R1.fastq
R2=${SampleID}_R2.fastq
</code></pre>
<h2>创建索引</h2>
<pre><code class="language-bash">
cd ${DB_DIR}/FMDV_reference
for refSuffix in param_dict.items():
    bowtie2-build ${refSuffix}.fna ${refSuffix}
</code></pre>
<h2>krakenuniq</h2>
<pre><code class="language-bash"># {step: krakenuniq}
krakenuniq --report-file report.tsv --db ${DB_DIR}/kraken_uniq_database \
    --threads ${T} --output report.kraken \
    --paired ${Fq1} ${Fq2} --unclassified-out unclassifed.txt --classified-out classifed.txt

# {step:parse krakenuniq report}
# result file list:
# - fastqc_result.json
# - report.tsv
# - report.kraken
# - res.json
# - tax.json
# - result/${SampleID}_R${n}_${SeroType}_{ReadsNum}.fastq
</code></pre>
<h2>溯源</h2>
<pre><code class="language-bash">for SeroType,refSuffix in #{Assemble Param data from Part1 result}:
    # 进入一个单独的目录,该目录下全是同一 SeroType 不同样本的结果序列
    mkdir temp_xx &amp;&amp; cd temp_xx
    for SampleID,ReadsNum in #{Assemble Param data from Part1 reuslt By Sample}:
        Fq1=${Path2Sample}/${SampleID}_R1_${SeroType}_{ReadsNum}.fastq
        Fq2=${Path2Sample}/${SampleID}_R2_${SeroType}_{ReadsNum}.fastq
        
        bowtie2 -x ${DB_DIR}/FMDV_reference/${refSuffix} -U ${Fq1},${Fq2} -S paired.sam 
        samtools view -bS paired.sam -o paired.bam
        samtools sort -o paired.sorted.bam paired.bam
        # {samtools mpileup 命令已过时，改用 bcftools mpileup}
        # {samtools mpileup -Ou -f ${DB_DIR}/FMDV_reference/${refSuffix}.fna paired.bam} 
        # 一致性序列,**该步骤会假设所有位点都是双倍体**
        bcftools mpileup -Ou -f ${DB_DIR}/FMDV_reference/${refSuffix}.fna -o mpileup.vcf paired.sorted.bam
        bcftools call -c -o all_site.vcf mpileup.vcf 
        # vcfutils.pl 属于 bcftools 软件的工具,将 vcf 转换成fastq
        vcfutils.pl vcf2fq all_site.vcf &gt; cns.fastq
        # 将 fastq 转换成fasta
        seqtk seq -aQ64 -q20 -n N cns.fastq &gt; cns.fasta
        # 将序列ID替换
        sed -i 's/^&gt;.*$/&gt;${SampleID}_${SeroType}_{ReadsNum}/g' ${SampleID}_${SeroType}_{ReadsNum}_cns.fasta 

    cat ${DB_DIR}/FMDV_type/${SeroType}.fa temp_xx/*_cns.fasta &gt; all.fa
    mafft all.fa &gt; fmdv_all.aln
    trimal -in fmdv_all.aln -out fmdv.aln.trimmed
    fasttree -gamma -nt -gtr -out fmdv.tree fmdv.aln.trimmed
# 最后将所有的 fmdv.tree 汇总

</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/314/mngs流程开发笔记</link><guid isPermaLink="true">http://an.forum.genostack.com/topic/314/mngs流程开发笔记</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Tue, 01 Jun 2021 03:56:43 GMT</pubDate></item></channel></rss>