由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 也弱问一个SAS里面genotype/SNP variable recoding的问题
相关主题
SAS CODE HELP!用R怎样能提取一个 .txt文件中的一个数?
SAS 问题[合集] 请教如何分析tag SNPs 以找出和疾病相关的Markers
logistic repression 多分类变量定义哑变量与不定义,结果为何截然不同?请教一下sas proc ANOVA.
SAS里关于recode一问sas help, how to draw a frequency table in sas
复杂分类变量recoding?包子求助sas问题
请教一个SAS recode variable的问题吧asking for help with Proc SurveySelect again (THANK YOU !!!)
R 编程面试题,被弄残废了,在这里求解,钱不多,但会鼎力散财,最大值和最小值输出
Data Cleaninghow to generate a frequency table and rank the the nunbers in the table in SAS?
相关话题的讨论汇总
话题: snp话题: allele话题: genotype话题: sas话题: frequency
进入Statistics版参与讨论
1 (共1页)
l******o
发帖数: 3764
1
100个snp, snp1-snp100,
每个snp有3种可能的genotype 比如AA AT TT
怎么样按genotype frequency high->low 给这三个基因型赋值 0 1 2?
补充一下 大概我说的太不清楚了 而且我忘记说明问的是SAS code 不好意思
我不是问怎么求每个SNP的allele frequency
而是想问有什么批量处理的方法能自动检测每个SNP的genotype frequency并且recode成0 1 2
感觉大家给我的建议都是手动一个个的操作啊
如果不是这个意思的话 还请高手们给点详细的建议
多谢多谢
m*****s
发帖数: 156
2
I am not sure what you want to do, but typical coding by allele frequency is
done like this. First calculate the allele frequencies of A,T and determine
the minor allele (frequency<0.5). Using the minor allele as reference
allele, you can code the three genotype by the count of the reference allele
. For example, if you have reference allele A, then code like this, AA->2,
AT->1, and TT->0

【在 l******o 的大作中提到】
: 100个snp, snp1-snp100,
: 每个snp有3种可能的genotype 比如AA AT TT
: 怎么样按genotype frequency high->low 给这三个基因型赋值 0 1 2?
: 补充一下 大概我说的太不清楚了 而且我忘记说明问的是SAS code 不好意思
: 我不是问怎么求每个SNP的allele frequency
: 而是想问有什么批量处理的方法能自动检测每个SNP的genotype frequency并且recode成0 1 2
: 感觉大家给我的建议都是手动一个个的操作啊
: 如果不是这个意思的话 还请高手们给点详细的建议
: 多谢多谢

a****g
发帖数: 8131
3
写个macro挨个赋值
坐等更高级的解法出现

【在 l******o 的大作中提到】
: 100个snp, snp1-snp100,
: 每个snp有3种可能的genotype 比如AA AT TT
: 怎么样按genotype frequency high->low 给这三个基因型赋值 0 1 2?
: 补充一下 大概我说的太不清楚了 而且我忘记说明问的是SAS code 不好意思
: 我不是问怎么求每个SNP的allele frequency
: 而是想问有什么批量处理的方法能自动检测每个SNP的genotype frequency并且recode成0 1 2
: 感觉大家给我的建议都是手动一个个的操作啊
: 如果不是这个意思的话 还请高手们给点详细的建议
: 多谢多谢

l******o
发帖数: 3764
4
是啊
可是frequency这一步怎么得啊?

is
determine
allele

【在 m*****s 的大作中提到】
: I am not sure what you want to do, but typical coding by allele frequency is
: done like this. First calculate the allele frequencies of A,T and determine
: the minor allele (frequency<0.5). Using the minor allele as reference
: allele, you can code the three genotype by the count of the reference allele
: . For example, if you have reference allele A, then code like this, AA->2,
: AT->1, and TT->0

l******o
发帖数: 3764
5
能给具体写写吗?
我就是不知道用什么得到frequency

【在 a****g 的大作中提到】
: 写个macro挨个赋值
: 坐等更高级的解法出现

b*****n
发帖数: 685
6
you mean allele frequency or what?
q********i
发帖数: 795
7
plink --recodeAD --out 不是直接都给出的吗?

【在 l******o 的大作中提到】
: 100个snp, snp1-snp100,
: 每个snp有3种可能的genotype 比如AA AT TT
: 怎么样按genotype frequency high->low 给这三个基因型赋值 0 1 2?
: 补充一下 大概我说的太不清楚了 而且我忘记说明问的是SAS code 不好意思
: 我不是问怎么求每个SNP的allele frequency
: 而是想问有什么批量处理的方法能自动检测每个SNP的genotype frequency并且recode成0 1 2
: 感觉大家给我的建议都是手动一个个的操作啊
: 如果不是这个意思的话 还请高手们给点详细的建议
: 多谢多谢

l******o
发帖数: 3764
8
是的 可能说的不太清楚 不好意思

【在 b*****n 的大作中提到】
: you mean allele frequency or what?
b*****n
发帖数: 685
9
一加一除不就得了。

【在 l******o 的大作中提到】
: 是的 可能说的不太清楚 不好意思
l******o
发帖数: 3764
10
一百个snp都手动一加一除?

【在 b*****n 的大作中提到】
: 一加一除不就得了。
l******o
发帖数: 3764
11
补充一下 不知道是不是我说的太不清楚了
我不是问怎么求每个SNP的allele frequency
而是想问有什么批量处理的方法能自动检测每个SNP的genotype frequency并且recode
成0 1 2
感觉大家给我的建议都是手动一个个的操作啊
如果不是这个意思的话 还请高手们给点详细的建议
多谢多谢
m*****s
发帖数: 156
12
R, SAS, or other programs you are familiar with

recode

【在 l******o 的大作中提到】
: 补充一下 不知道是不是我说的太不清楚了
: 我不是问怎么求每个SNP的allele frequency
: 而是想问有什么批量处理的方法能自动检测每个SNP的genotype frequency并且recode
: 成0 1 2
: 感觉大家给我的建议都是手动一个个的操作啊
: 如果不是这个意思的话 还请高手们给点详细的建议
: 多谢多谢

a********s
发帖数: 188
13
You can write a SAS Macro to assign 0,1,2 to each SNP, one by one. If you
want, you can refer the following steps:
(1) Use PROC CONTENTS and PROC SQL to output all SNP names into a macro
variable, separated by " "
(2) Use DO WHILE ... (statement) ... END to assign 0,1,2 to each snp based
on alleles' frequencies.
(2.1) Inside the (statement), use PROC FREQ, and data MERGE functions to
calculate frequencies, assign 0,1,2, and merge dataset
1 (共1页)
进入Statistics版参与讨论
相关主题
how to generate a frequency table and rank the the nunbers in the table in SAS?复杂分类变量recoding?
SAS Macro求教请教一个SAS recode variable的问题吧
请教一道sas adv题R 编程面试题,被弄残废了,在这里求解,钱不多,但会鼎力散财,
问个SAS,Two-Way Frequency Table Analysis的问题Data Cleaning
SAS CODE HELP!用R怎样能提取一个 .txt文件中的一个数?
SAS 问题[合集] 请教如何分析tag SNPs 以找出和疾病相关的Markers
logistic repression 多分类变量定义哑变量与不定义,结果为何截然不同?请教一下sas proc ANOVA.
SAS里关于recode一问sas help, how to draw a frequency table in sas
相关话题的讨论汇总
话题: snp话题: allele话题: genotype话题: sas话题: frequency