• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
萧飒
Do it right and do it now
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

随笔分类 -  SHELL

 
根据文件大小或自定义次数进行复制
摘要:#!/bin/bash cp $1 1mb$1 size=$(stat $1 |grep Size|awk '{print $2}') while [ $size -le $2] do cat $1 >>1mb$1 size=$(stat 1mb$1|grep Size|awk '{print $2 阅读全文
posted @ 2022-11-08 10:30 萧飒 阅读(63) 评论(0) 推荐(0)
gwas流程
摘要:1.首先创建ID列表和表型文件用gwas5.sh进行FarmCPU和MLM进行关联分析(mvp_p_k.r),同时计算了PCA。 2.用lddecay.sh计算vcf的ld,储存在lddecay文件夹 3.用annovar对vcf进行注释,得到hmp.txt文件 4.通过比较QQ图发现FarmCPU 阅读全文
posted @ 2022-11-04 09:18 萧飒 阅读(321) 评论(0) 推荐(0)
从significant snp 的LD 范围内的SNP,进行finemap定位分析
摘要:#!/bin/bash #set -Eeuo pipefail if [ $# -lt 2 ] then echo "par1 is vcf,par2 is pvalue,sample_size=297" exit fi #vcftools --vcf $1 --freq --out ${1}maf 阅读全文
posted @ 2022-08-23 16:17 萧飒 阅读(196) 评论(0) 推荐(0)
利用peak_snp,找其LD块,并找到其中的基因,然后将LD中的SNP信息变成finemap软件的输入格式
摘要:#!/bin/bash #LD PLOT #author lee echo"par1 is vcf,par2 is top_chr" Genome=/public/home/caisl/lee/genome/rice/msu.gff3 while read chr pos do pos_up=$(( 阅读全文
posted @ 2022-08-23 13:04 萧飒 阅读(159) 评论(0) 推荐(0)
vlookup.sh
该文被密码保护。
posted @ 2022-07-08 16:25 萧飒 阅读(0) 评论(0) 推荐(0)
shell 脚本模板
摘要:#!/usr/bin/env bash #this srcipt is to do wheat_bsa #author lee #this is fail test, because bash didn't care about the failure of command #this can pr 阅读全文
posted @ 2021-11-15 11:22 萧飒 阅读(133) 评论(0) 推荐(0)
交互或批量计算区间内基因数目(while read)
摘要:###1.交互状态 #!/bin/bash #count genes in region,need three para #author lee if [ $# -ne 3 ] then echo "Usage chr start end" else num=$(awk -v chr=$1 -v s 阅读全文
posted @ 2021-09-01 16:15 萧飒 阅读(125) 评论(0) 推荐(0)
统计文件某列各项或某项出现次数(VCF文件中每个染色体信息)
摘要:#!/bin/bash grep -v ^# $i|awk '{sum[$1+=1]END{for(i in sum)print i"\t" sum[i]}' >chr_info #按大小排序 sort -n chr_info #某列求和 awk '{sum +=$2;END {print sum} 阅读全文
posted @ 2021-08-31 21:05 萧飒 阅读(205) 评论(0) 推荐(0)
shell 下实现VLOOKUP
摘要:#!/bin/bash #vlookup #author lee #date 2021.8.26 if [ $# -ne 2 ] then echo "File number supplied is not right" echo "Input File1 that have your info" 阅读全文
posted @ 2021-08-26 17:43 萧飒 阅读(281) 评论(0) 推荐(0)
 

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3