genetica:preproc_models
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
genetica:preproc_models [2013/05/16 15:55] – [Alternativa a Fisher: Barnard Test] osotolongo | genetica:preproc_models [2020/08/04 10:58] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 6: | Line 6: | ||
< | < | ||
- | $ plink plink --bfile archivo --model --allow-no-sex --out archivo | + | $ plink --bfile archivo --model --allow-no-sex --out archivo |
</ | </ | ||
Line 37: | Line 37: | ||
# Copyright 2013 O. Sotolongo < | # Copyright 2013 O. Sotolongo < | ||
+ | # This program is free software; you can redistribute it and/or modify | ||
+ | # it under the terms of the GNU General Public License as published by | ||
+ | # the Free Software Foundation; either version 2 of the License, or | ||
+ | # (at your option) any later version. | ||
+ | # | ||
+ | # This program is distributed in the hope that it will be useful, | ||
+ | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
+ | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
+ | # GNU General Public License for more details. | ||
+ | # | ||
use strict; use warnings; | use strict; use warnings; | ||
use File::Slurp qw(read_file); | use File::Slurp qw(read_file); | ||
Line 47: | Line 57: | ||
my $ofile = $plist; | my $ofile = $plist; | ||
- | $ofile =~ s/ | + | $ofile =~ s/ |
- | + | # cambiar a clustering con (?:PATTERN) | |
- | my %input_data = reverse map {/^(.*\s+(rs\d+)\s+.*)$/} grep {/ | + | my %input_data = reverse map {/^(\s*\d+\s+(\S+)\s+[A, |
- | my %bim_data = map {/^\d+\s+(rs\d+)\s+\d+\.*\d*\s+(\d+)\s+[A, | + | my %bim_data = map {/^\d+\s+(.*)\s+\d+\.*\d*\s+(\d+)\s+[A, |
my %cells; | my %cells; | ||
foreach my $marker (sort keys %input_data){ | foreach my $marker (sort keys %input_data){ | ||
- | (@{$cells{$marker}} {qw/chr allele1 allele2 affa1 affa2 unaffa1 unaffa2 chi2 df pval0/}) = $input_data{$marker} =~ / | + | (@{$cells{$marker}} {qw/chr allele1 allele2 affa1 affa2 unaffa1 unaffa2 chi2 df pval0/}) = $input_data{$marker} =~ / |
if(exists($cells{$marker}{affa1}) && exists($cells{$marker}{affa2}) && exists($cells{$marker}{unaffa1}) && exists($cells{$marker}{unaffa2})){ | if(exists($cells{$marker}{affa1}) && exists($cells{$marker}{affa2}) && exists($cells{$marker}{unaffa1}) && exists($cells{$marker}{unaffa2})){ | ||
my $affa1 = $cells{$marker}{affa1}; | my $affa1 = $cells{$marker}{affa1}; | ||
Line 79: | Line 89: | ||
foreach my $marker (sort {($cells{$a}-> | foreach my $marker (sort {($cells{$a}-> | ||
- | print ODF " | + | if(exists($bim_data{$marker})){ |
+ | print ODF " | ||
+ | } | ||
} | } | ||
Line 145: | Line 157: | ||
$cells{$marker}{pvalue} = shit-> | $cells{$marker}{pvalue} = shit-> | ||
</ | </ | ||
+ | |||
+ | **OJO:** Esto demora muchisimo. Despues de 5 días de calculo sobre una base de datos y modelo dominate tuve que para la ejecucion. Lo lanzare cuando tenga tiempo y la base de datos a usar este definida. |
genetica/preproc_models.1368719745.txt.gz · Last modified: 2020/08/04 10:48 (external edit)