上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页
摘要: 同一时间泛型只能是同一种类型,否则就用多个泛型参数。结构体这里的泛型参数T和K,就表示不同的参数类型,当然T和K也可以是同一种类型。 #[derive(Debug)] struct Base<T,K> { x: T, y: T, z: K, } impl<T,K> Base<T,K> { fn ne 阅读全文
posted @ 2022-07-05 22:09 天使不设防 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 很久没更新博客了,惭愧OTZ.废话不多说,交作业啦(ง •_•)ง,学了一点rust基础,写了一个可视化fastq文件的小工具。 1、安装 地址:https://github.com/sharkLoc/visual_fq ,因为是linux平台下的工具(win下也是可以的嘛💪),预先安装依赖 。 阅读全文
posted @ 2022-06-30 23:01 天使不设防 阅读(178) 评论(0) 推荐(1) 编辑
摘要: rust特征小示例 1 #[derive(Debug)] 2 pub struct User{ 3 pub name:String, 4 pub gender: bool, 5 pub age:u8, 6 } 7 // 特征(接口) 8 pub trait Cheat{ 9 fn new(name: 阅读全文
posted @ 2022-03-18 14:50 天使不设防 阅读(56) 评论(0) 推荐(0) 编辑
摘要: samtools flags 分解 bam文件的第二列的flag值,代表了当前read比对到基因组序列的基本情况。flag值由2的0次方到2的11次方这11个数字组成,即1,2,4,8,16,32,64,128,256,512,1024,2048。每个数字表示的比对情况这里不赘述,当获得当前read的flag值时,如何拆解成flag最 阅读全文
posted @ 2022-03-06 22:03 天使不设防 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 这里就用perl自带的DATA句柄做示例。 1 #!/usr/bin/perl 2 use strict; 3 use warnings; 4 5 my %hash; 6 my @arr; 7 while(<DATA>){ 8 chomp; 9 my @line = split /\s+/,$_; 阅读全文
posted @ 2022-03-03 22:32 天使不设防 阅读(302) 评论(0) 推荐(0) 编辑
摘要: centOS具体版本:8.5.2111 nas盘挂载需要root权限,比如挂载在 /mnt/nas目录,命令如下: cd /mnt && mkdir nasmount -t cifs -o iocharset=utf8,username=账户名,password=密码 //192.xxx.xx.xx 阅读全文
posted @ 2022-02-15 20:42 天使不设防 阅读(702) 评论(0) 推荐(0) 编辑
摘要: 欢迎自取 阅读全文
posted @ 2022-01-30 14:07 天使不设防 阅读(505) 评论(0) 推荐(1) 编辑
摘要: 主要是针对数据框后面跟变量,获取数据的情况。 df<-data.frame(A=c(1,2,3),B=c(6,7,8)) tmp<-"B" # dftmp // 输出 NULL eval(parse(text = paste0("df$",tmp))) 阅读全文
posted @ 2022-01-28 13:37 天使不设防 阅读(188) 评论(0) 推荐(0) 编辑
摘要: library(ggplot2) library(cowplot) df<-data.frame(K=LETTERS[1:4],V=c(10,20,100,60)) p1<-ggplot(df,aes(x=K,y=V,fill=K))+geom_bar(stat = 'identity')+ lab 阅读全文
posted @ 2022-01-24 16:25 天使不设防 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 就像下面的这个例子,直接把要返回的类型包裹在一个枚举中,接收函数再根据结果分别处理。 1 use std::fs::File; 2 use std::io::BufReader; 3 use flate2::read::GzDecoder; 4 #[allow(non_camel_case_type 阅读全文
posted @ 2022-01-18 11:18 天使不设防 阅读(991) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页
点击右上角即可分享
微信分享提示