当前位置:   article > 正文

生信&数据挖掘——人工神经网络篇(2)GEO数据下载及注释_如何获取geo数据库中的gpl24676的探针数据并进行注释?

如何获取geo数据库中的gpl24676的探针数据并进行注释?

目录

序言

GEO数据下载

GEO数据注释


序言

基因组学是一门研究基因组的科学,它涉及到基因组的结构,功能,表达,进化和疾病相关性等方面。基因组学的研究需要大量的基因数据,而这些数据可以从公共数据库中获得。

其中最常用的数据库是GEO(Gene Expression Omnibus),它提供了大量的基因表达数据,可以用于基因组学研究。 GEO数据库中的数据可以通过FTP或Web界面下载,下载的数据可以是原始数据,也可以是已经注释的数据。

下载的原始数据需要进行注释,以便更好地理解和分析数据。GEO数据库中的数据可以使用多种注释工具进行注释,如NCBI的GeneInfo,Ensembl,UniProt,KEGG,GO等。

本文将介绍如何从GEO数据库中下载基因数据,以及如何使用不同的注释工具对数据进行注释。首先,我们将介绍如何从GEO数据库中下载基因数据,包括如何搜索和下载数据,以及如何解压缩下载的数据。然后,我们将介绍如何使用不同的注释工具对数据进行注释,包括NCBI的GeneInfo,Ensembl,UniProt,KEGG,GO等。

最后,我们将介绍如何使用ANN技术对基因数据进行分析,以及如何利用注释的基因数据进行生物信息学研究。

GEO数据下载

https://www.ncbi.nlm.nih.gov/geo/ 

搜索关键字:gastric cancer

下载两个文件,平台文件和基因表达矩阵 

基因表达文件名为GSE54129_series_matrix.txt 

探针文件名字改成GPL570-55999.txt

GEO数据注释

对GEO数据库中的数据进行详细的解释和描述,以便更好地理解基因表达的调控机制。GEO数据注释可以帮助研究人员更好地分析和理解GEO数据库中的数据,从而更好地利用GEO数据库中的数据进行研究。

流程如下:

将基因表达文件改名为ann.txt  探针文件名字改成probe.txt

将perl脚本放下去

 先查看ann.txt中基因名称是第几列,在第11列

 打开cmd终端 输入perl 脚本名字即可注释完成

 

输入基因的名字在哪一列

 得到geneMatrix.txt改名为GSE54129.txt,即是注释好的文件

脚本代码如下:

  1. #!/usr/bin/perl
  2. #line 2 "C:\Strawberry\perl\site\bin\par.pl"
  3. eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
  4. if 0; # not running under some shell
  5. package __par_pl;
  6. # --- This script must not use any modules at compile time ---
  7. # use strict;
  8. #line 156
  9. my ($PAR_MAGIC, $par_temp, $progname, @tmpfile, %ModuleCache);
  10. END { if ($ENV{PAR_CLEAN}) {
  11. require File::Temp;
  12. require File::Basename;
  13. require File::Spec;
  14. my $topdir = File::Basename::dirname($par_temp);
  15. outs(qq[Removing files in "$par_temp"]);
  16. File::Find::finddepth(sub { ( -d ) ? rmdir : unlink }, $par_temp);
  17. rmdir $par_temp;
  18. # Don't remove topdir because this causes a race with other apps
  19. # that are trying to start.
  20. if (-d $par_temp && $^O ne 'MSWin32') {
  21. # Something went wrong unlinking the temporary directory. This
  22. # typically happens on platforms that disallow unlinking shared
  23. # libraries and executables that are in use. Unlink with a background
  24. # shell command so the files are no longer in use by this process.
  25. # Don't do anything on Windows because our parent process will
  26. # take care of cleaning things up.
  27. my $tmp = new File::Temp(
  28. TEMPLATE => 'tmpXXXXX',
  29. DIR => File::Basename::dirname($topdir),
  30. SUFFIX => '.cmd',
  31. UNLINK => 0,
  32. );
  33. my $filename = $tmp->filename;
  34. print $tmp <<"...";
  35. #!/bin/sh
  36. x=1; while [ \$x -lt 10 ]; do
  37. rm -rf '$par_temp'
  38. if [ \! -d '$par_temp' ]; then
  39. break
  40. fi
  41. sleep 1
  42. x=`expr \$x + 1`
  43. done
  44. rm '$filename'
  45. ...
  46. close $tmp;
  47. chmod 0700, $filename;
  48. my $cmd = "$filename >/dev/null 2>&1 &";
  49. system($cmd);
  50. outs(qq[Spawned background process to perform cleanup: $filename]);
  51. }
  52. } }
  53. BEGIN {
  54. Internals::PAR::BOOT() if defined &Internals::PAR::BOOT;
  55. $PAR_MAGIC = "\nPAR.pm\n";
  56. eval {
  57. _par_init_env();
  58. my $quiet = !$ENV{PAR_DEBUG};
  59. # fix $progname if invoked from PATH
  60. my %Config = (
  61. path_sep => ($^O =~ /^MSWin/ ? ';' : ':'),
  62. _exe => ($^O =~ /^(?:MSWin|OS2|cygwin)/ ? '.exe' : ''),
  63. _delim => ($^O =~ /^MSWin|OS2/ ? '\\' : '/'),
  64. );
  65. _set_progname();
  66. _set_par_temp();
  67. # Magic string checking and extracting bundled modules {{{
  68. my ($start_pos, $data_pos);
  69. {
  70. local $SIG{__WARN__} = sub {};
  71. # Check file type, get start of data section {{{
  72. open _FH, '<:raw', $progname or last;
  73. # Search for the "\nPAR.pm\n signature backward from the end of the file
  74. my $buf;
  75. my $size = -s $progname;
  76. my $chunk_size = 64 * 1024;
  77. my $magic_pos;
  78. if ($size <= $chunk_size) {
  79. $magic_pos = 0;
  80. } elsif ((my $m = $size % $chunk_size) > 0) {
  81. $magic_pos = $size - $m;
  82. } else {
  83. $magic_pos = $size - $chunk_size;
  84. }
  85. # in any case, $magic_pos is a multiple of $chunk_size
  86. while ($magic_pos >= 0) {
  87. seek _FH, $magic_pos, 0;
  88. read _FH, $buf, $chunk_size + length($PAR_MAGIC);
  89. if ((my $i = rindex($buf, $PAR_MAGIC)) >= 0) {
  90. $magic_pos += $i;
  91. last;
  92. }
  93. $magic_pos -= $chunk_size;
  94. }
  95. last if $magic_pos < 0;
  96. # Seek 4 bytes backward from the signature to get the offset of the
  97. # first embedded FILE, then seek to it
  98. seek _FH, $magic_pos - 4, 0;
  99. read _FH, $buf, 4;
  100. seek _FH, $magic_pos - 4 - unpack("N", $buf), 0;
  101. $data_pos = tell _FH;
  102. # }}}
  103. # Extracting each file into memory {{{
  104. my %require_list;
  105. read _FH, $buf, 4; # read the first "FILE"
  106. while ($buf eq "FILE") {
  107. read _FH, $buf, 4;
  108. read _FH, $buf, unpack("N", $buf);
  109. my $fullname = $buf;
  110. outs(qq[Unpacking FILE "$fullname"...]);
  111. my $crc = ( $fullname =~ s|^([a-f\d]{8})/|| ) ? $1 : undef;
  112. my ($basename, $ext) = ($buf =~ m|(?:.*/)?(.*)(\..*)|);
  113. read _FH, $buf, 4;
  114. read _FH, $buf, unpack("N", $buf);
  115. if (defined($ext) and $ext !~ /\.(?:pm|pl|ix|al)$/i) {
  116. my $filename = _save_as("$crc$ext", $buf, 0755);
  117. $PAR::Heavy::FullCache{$fullname} = $filename;
  118. $PAR::Heavy::FullCache{$filename} = $fullname;
  119. }
  120. elsif ( $fullname =~ m|^/?shlib/| and defined $ENV{PAR_TEMP} ) {
  121. my $filename = _save_as("$basename$ext", $buf, 0755);
  122. outs("SHLIB: $filename\n");
  123. }
  124. else {
  125. $require_list{$fullname} =
  126. $ModuleCache{$fullname} = {
  127. buf => $buf,
  128. crc => $crc,
  129. name => $fullname,
  130. };
  131. }
  132. read _FH, $buf, 4;
  133. }
  134. # }}}
  135. local @INC = (sub {
  136. my ($self, $module) = @_;
  137. return if ref $module or !$module;
  138. my $info = delete $require_list{$module} or return;
  139. $INC{$module} = "/loader/$info/$module";
  140. if ($ENV{PAR_CLEAN} and defined(&IO::File::new)) {
  141. my $fh = IO::File->new_tmpfile or die "Can't create temp file: $!";
  142. $fh->binmode();
  143. $fh->print($info->{buf});
  144. $fh->seek(0, 0);
  145. return $fh;
  146. }
  147. else {
  148. my $filename = _save_as("$info->{crc}.pm", $info->{buf});
  149. open my $fh, '<:raw', $filename or die qq[Can't read "$filename": $!];
  150. return $fh;
  151. }
  152. die "Bootstrapping failed: can't find module $module!";
  153. }, @INC);
  154. # Now load all bundled files {{{
  155. # initialize shared object processing
  156. require XSLoader;
  157. require PAR::Heavy;
  158. require Carp::Heavy;
  159. require Exporter::Heavy;
  160. PAR::Heavy::_init_dynaloader();
  161. # now let's try getting helper modules from within
  162. require IO::File;
  163. # load rest of the group in
  164. while (my $filename = (sort keys %require_list)[0]) {
  165. #local $INC{'Cwd.pm'} = __FILE__ if $^O ne 'MSWin32';
  166. unless ($INC{$filename} or $filename =~ /BSDPAN/) {
  167. # require modules, do other executable files
  168. if ($filename =~ /\.pmc?$/i) {
  169. require $filename;
  170. }
  171. else {
  172. # Skip ActiveState's sitecustomize.pl file:
  173. do $filename unless $filename =~ /sitecustomize\.pl$/;
  174. }
  175. }
  176. delete $require_list{$filename};
  177. }
  178. # }}}
  179. last unless $buf eq "PK\003\004";
  180. $start_pos = (tell _FH) - 4; # start of zip
  181. }
  182. # }}}
  183. # Argument processing {{{
  184. my @par_args;
  185. my ($out, $bundle, $logfh, $cache_name);
  186. delete $ENV{PAR_APP_REUSE}; # sanitize (REUSE may be a security problem)
  187. $quiet = 0 unless $ENV{PAR_DEBUG};
  188. # Don't swallow arguments for compiled executables without --par-options
  189. if (!$start_pos or ($ARGV[0] eq '--par-options' && shift)) {
  190. my %dist_cmd = qw(
  191. p blib_to_par
  192. i install_par
  193. u uninstall_par
  194. s sign_par
  195. v verify_par
  196. );
  197. # if the app is invoked as "appname --par-options --reuse PROGRAM @PROG_ARGV",
  198. # use the app to run the given perl code instead of anything from the
  199. # app itself (but still set up the normal app environment and @INC)
  200. if (@ARGV and $ARGV[0] eq '--reuse') {
  201. shift @ARGV;
  202. $ENV{PAR_APP_REUSE} = shift @ARGV;
  203. }
  204. else { # normal parl behaviour
  205. my @add_to_inc;
  206. while (@ARGV) {
  207. $ARGV[0] =~ /^-([AIMOBLbqpiusTv])(.*)/ or last;
  208. if ($1 eq 'I') {
  209. push @add_to_inc, $2;
  210. }
  211. elsif ($1 eq 'M') {
  212. eval "use $2";
  213. }
  214. elsif ($1 eq 'A') {
  215. unshift @par_args, $2;
  216. }
  217. elsif ($1 eq 'O') {
  218. $out = $2;
  219. }
  220. elsif ($1 eq 'b') {
  221. $bundle = 'site';
  222. }
  223. elsif ($1 eq 'B') {
  224. $bundle = 'all';
  225. }
  226. elsif ($1 eq 'q') {
  227. $quiet = 1;
  228. }
  229. elsif ($1 eq 'L') {
  230. open $logfh, ">>", $2 or die qq[Can't open log file "$2": $!];
  231. }
  232. elsif ($1 eq 'T') {
  233. $cache_name = $2;
  234. }
  235. shift(@ARGV);
  236. if (my $cmd = $dist_cmd{$1}) {
  237. delete $ENV{'PAR_TEMP'};
  238. init_inc();
  239. require PAR::Dist;
  240. &{"PAR::Dist::$cmd"}() unless @ARGV;
  241. &{"PAR::Dist::$cmd"}($_) for @ARGV;
  242. exit;
  243. }
  244. }
  245. unshift @INC, @add_to_inc;
  246. }
  247. }
  248. # XXX -- add --par-debug support!
  249. # }}}
  250. # Output mode (-O) handling {{{
  251. if ($out) {
  252. {
  253. #local $INC{'Cwd.pm'} = __FILE__ if $^O ne 'MSWin32';
  254. require IO::File;
  255. require Archive::Zip;
  256. require Digest::SHA;
  257. }
  258. my $par = shift(@ARGV);
  259. my $zip;
  260. if (defined $par) {
  261. open my $fh, '<:raw', $par or die qq[Can't find par file "$par": $!];
  262. bless($fh, 'IO::File');
  263. $zip = Archive::Zip->new;
  264. ( $zip->readFromFileHandle($fh, $par) == Archive::Zip::AZ_OK() )
  265. or die qq[Error reading zip archive "$par"];
  266. }
  267. my %env = do {
  268. if ($zip and my $meta = $zip->contents('META.yml')) {
  269. $meta =~ s/.*^par:$//ms;
  270. $meta =~ s/^\S.*//ms;
  271. $meta =~ /^ ([^:]+): (.+)$/mg;
  272. }
  273. };
  274. # Open input and output files {{{
  275. if (defined $par) {
  276. open my $ph, '<:raw', $par or die qq[Can't read par file "$par": $!];
  277. my $buf;
  278. read $ph, $buf, 4;
  279. die qq["$par" is not a par file] unless $buf eq "PK\003\004";
  280. close $ph;
  281. }
  282. CreatePath($out) ;
  283. my $fh = IO::File->new(
  284. $out,
  285. IO::File::O_CREAT() | IO::File::O_WRONLY() | IO::File::O_TRUNC(),
  286. 0777,
  287. ) or die qq[Can't create file "$out": $!];
  288. $fh->binmode();
  289. seek _FH, 0, 0;
  290. my $loader;
  291. if (defined $data_pos) {
  292. read _FH, $loader, $data_pos;
  293. } else {
  294. local $/ = undef;
  295. $loader = <_FH>;
  296. }
  297. if (!$ENV{PAR_VERBATIM} and $loader =~ /^(?:#!|\@rem)/) {
  298. require PAR::Filter::PodStrip;
  299. PAR::Filter::PodStrip->apply(\$loader, $0);
  300. }
  301. foreach my $key (sort keys %env) {
  302. my $val = $env{$key} or next;
  303. $val = eval $val if $val =~ /^['"]/;
  304. my $magic = "__ENV_PAR_" . uc($key) . "__";
  305. my $set = "PAR_" . uc($key) . "=$val";
  306. $loader =~ s{$magic( +)}{
  307. $magic . $set . (' ' x (length($1) - length($set)))
  308. }eg;
  309. }
  310. $fh->print($loader);
  311. # }}}
  312. # Write bundled modules {{{
  313. if ($bundle) {
  314. require PAR::Heavy;
  315. PAR::Heavy::_init_dynaloader();
  316. init_inc();
  317. require_modules();
  318. my @inc = grep { !/BSDPAN/ }
  319. grep {
  320. ($bundle ne 'site') or
  321. ($_ ne $Config::Config{archlibexp} and
  322. $_ ne $Config::Config{privlibexp});
  323. } @INC;
  324. # normalize paths (remove trailing or multiple consecutive slashes)
  325. s|/+|/|g, s|/$|| foreach @inc;
  326. # Now determine the files loaded above by require_modules():
  327. # Perl source files are found in values %INC and DLLs are
  328. # found in @DynaLoader::dl_shared_objects.
  329. my %files;
  330. $files{$_}++ for @DynaLoader::dl_shared_objects, values %INC;
  331. my $lib_ext = $Config::Config{lib_ext}; # XXX lib_ext vs dlext ?
  332. my %written;
  333. foreach my $key (sort keys %files) {
  334. my ($file, $name);
  335. if (defined(my $fc = $PAR::Heavy::FullCache{$key})) {
  336. ($file, $name) = ($key, $fc);
  337. }
  338. else {
  339. foreach my $dir (@inc) {
  340. if ($key =~ m|^\Q$dir\E/(.*)$|i) {
  341. ($file, $name) = ($key, $1);
  342. last;
  343. }
  344. if ($key =~ m|^/loader/[^/]+/(.*)$|) {
  345. if (my $ref = $ModuleCache{$1}) {
  346. ($file, $name) = ($ref, $1);
  347. last;
  348. }
  349. if (-f "$dir/$1") {
  350. ($file, $name) = ("$dir/$1", $1);
  351. last;
  352. }
  353. }
  354. }
  355. }
  356. # There are legitimate reasons why we couldn't find $name and $file for a $key:
  357. # - cperl has e.g. $INC{"XSLoader.pm"} = "XSLoader.c",
  358. # $INC{"DynaLoader.pm"}' = "dlboot_c.PL"
  359. next unless defined $name;
  360. next if $written{$name}++;
  361. next if !ref($file) and $file =~ /\.\Q$lib_ext\E$/i;
  362. outs(sprintf(qq[Packing FILE "%s"...], ref $file ? $file->{name} : $file));
  363. my $content;
  364. if (ref($file)) {
  365. $content = $file->{buf};
  366. }
  367. else {
  368. local $/ = undef;
  369. open my $fh, '<:raw', $file or die qq[Can't read "$file": $!];
  370. $content = <$fh>;
  371. close $fh;
  372. PAR::Filter::PodStrip->apply(\$content, "<embedded>/$name")
  373. if !$ENV{PAR_VERBATIM} and $name =~ /\.(?:pm|ix|al)$/i;
  374. PAR::Filter::PatchContent->new->apply(\$content, $file, $name);
  375. }
  376. $fh->print("FILE",
  377. pack('N', length($name) + 9),
  378. sprintf("%08x/%s", Archive::Zip::computeCRC32($content), $name),
  379. pack('N', length($content)),
  380. $content);
  381. outs(qq[Written as "$name"]);
  382. }
  383. }
  384. # }}}
  385. # Now write out the PAR and magic strings {{{
  386. $zip->writeToFileHandle($fh) if $zip;
  387. $cache_name = substr $cache_name, 0, 40;
  388. if (!$cache_name and my $mtime = (stat($out))[9]) {
  389. my $ctx = Digest::SHA->new(1);
  390. open my $fh, "<:raw", $out;
  391. $ctx->addfile($fh);
  392. close $fh;
  393. $cache_name = $ctx->hexdigest;
  394. }
  395. $cache_name .= "\0" x (41 - length $cache_name);
  396. $cache_name .= "CACHE";
  397. $fh->print($cache_name);
  398. $fh->print(pack('N', $fh->tell - length($loader)));
  399. $fh->print($PAR_MAGIC);
  400. $fh->close;
  401. chmod 0755, $out;
  402. # }}}
  403. exit;
  404. }
  405. # }}}
  406. # Prepare $progname into PAR file cache {{{
  407. {
  408. last unless defined $start_pos;
  409. _fix_progname();
  410. # Now load the PAR file and put it into PAR::LibCache {{{
  411. require PAR;
  412. PAR::Heavy::_init_dynaloader();
  413. {
  414. #local $INC{'Cwd.pm'} = __FILE__ if $^O ne 'MSWin32';
  415. require File::Find;
  416. require Archive::Zip;
  417. }
  418. my $fh = IO::File->new; # Archive::Zip operates on an IO::Handle
  419. $fh->fdopen(fileno(_FH), 'r') or die qq[fdopen() failed: $!];
  420. # Temporarily increase the chunk size for Archive::Zip so that it will find the EOCD
  421. # even if lots of stuff has been appended to the pp'ed exe (e.g. by OSX codesign).
  422. Archive::Zip::setChunkSize(-s _FH);
  423. my $zip = Archive::Zip->new;
  424. ( $zip->readFromFileHandle($fh, $progname) == Archive::Zip::AZ_OK() )
  425. or die qq[Error reading zip archive "$progname"];
  426. Archive::Zip::setChunkSize(64 * 1024);
  427. push @PAR::LibCache, $zip;
  428. $PAR::LibCache{$progname} = $zip;
  429. $quiet = !$ENV{PAR_DEBUG};
  430. outs(qq[\$ENV{PAR_TEMP} = "$ENV{PAR_TEMP}"]);
  431. if (defined $ENV{PAR_TEMP}) { # should be set at this point!
  432. foreach my $member ( $zip->members ) {
  433. next if $member->isDirectory;
  434. my $member_name = $member->fileName;
  435. next unless $member_name =~ m{
  436. ^
  437. /?shlib/
  438. (?:$Config::Config{version}/)?
  439. (?:$Config::Config{archname}/)?
  440. ([^/]+)
  441. $
  442. }x;
  443. my $extract_name = $1;
  444. my $dest_name = File::Spec->catfile($ENV{PAR_TEMP}, $extract_name);
  445. if (-f $dest_name && -s _ == $member->uncompressedSize()) {
  446. outs(qq[Skipping "$member_name" since it already exists at "$dest_name"]);
  447. } else {
  448. outs(qq[Extracting "$member_name" to "$dest_name"]);
  449. $member->extractToFileNamed($dest_name);
  450. chmod(0555, $dest_name) if $^O eq "hpux";
  451. }
  452. }
  453. }
  454. # }}}
  455. }
  456. # }}}
  457. # If there's no main.pl to run, show usage {{{
  458. unless ($PAR::LibCache{$progname}) {
  459. die << "." unless @ARGV;
  460. Usage: $0 [ -Alib.par ] [ -Idir ] [ -Mmodule ] [ src.par ] [ program.pl ]
  461. $0 [ -B|-b ] [-Ooutfile] src.par
  462. .
  463. $ENV{PAR_PROGNAME} = $progname = $0 = shift(@ARGV);
  464. }
  465. # }}}
  466. sub CreatePath {
  467. my ($name) = @_;
  468. require File::Basename;
  469. my ($basename, $path, $ext) = File::Basename::fileparse($name, ('\..*'));
  470. require File::Path;
  471. File::Path::mkpath($path) unless(-e $path); # mkpath dies with error
  472. }
  473. sub require_modules {
  474. require lib;
  475. require DynaLoader;
  476. require integer;
  477. require strict;
  478. require warnings;
  479. require vars;
  480. require Carp;
  481. require Carp::Heavy;
  482. require Errno;
  483. require Exporter::Heavy;
  484. require Exporter;
  485. require Fcntl;
  486. require File::Temp;
  487. require File::Spec;
  488. require XSLoader;
  489. require Config;
  490. require IO::Handle;
  491. require IO::File;
  492. require Compress::Zlib;
  493. require Archive::Zip;
  494. require Digest::SHA;
  495. require PAR;
  496. require PAR::Heavy;
  497. require PAR::Dist;
  498. require PAR::Filter::PodStrip;
  499. require PAR::Filter::PatchContent;
  500. require attributes;
  501. eval { require Cwd };
  502. eval { require Win32 };
  503. eval { require Scalar::Util };
  504. eval { require Archive::Unzip::Burst };
  505. eval { require Tie::Hash::NamedCapture };
  506. eval { require PerlIO; require PerlIO::scalar };
  507. eval { require utf8 };
  508. }
  509. # The C version of this code appears in myldr/mktmpdir.c
  510. # This code also lives in PAR::SetupTemp as set_par_temp_env!
  511. sub _set_par_temp {
  512. if (defined $ENV{PAR_TEMP} and $ENV{PAR_TEMP} =~ /(.+)/) {
  513. $par_temp = $1;
  514. return;
  515. }
  516. foreach my $path (
  517. (map $ENV{$_}, qw( PAR_TMPDIR TMPDIR TEMPDIR TEMP TMP )),
  518. qw( C:\\TEMP /tmp . )
  519. ) {
  520. next unless defined $path and -d $path and -w $path;
  521. my $username;
  522. my $pwuid;
  523. # does not work everywhere:
  524. eval {($pwuid) = getpwuid($>) if defined $>;};
  525. if ( defined(&Win32::LoginName) ) {
  526. $username = &Win32::LoginName;
  527. }
  528. elsif (defined $pwuid) {
  529. $username = $pwuid;
  530. }
  531. else {
  532. $username = $ENV{USERNAME} || $ENV{USER} || 'SYSTEM';
  533. }
  534. $username =~ s/\W/_/g;
  535. my $stmpdir = "$path$Config{_delim}par-".unpack("H*", $username);
  536. mkdir $stmpdir, 0755;
  537. if (!$ENV{PAR_CLEAN} and my $mtime = (stat($progname))[9]) {
  538. open my $fh, "<:raw", $progname or die qq[Can't read "$progname": $!];
  539. seek $fh, -18, 2;
  540. my $buf;
  541. read $fh, $buf, 6;
  542. if ($buf eq "\0CACHE") {
  543. seek $fh, -58, 2;
  544. read $fh, $buf, 41;
  545. $buf =~ s/\0//g;
  546. $stmpdir .= "$Config{_delim}cache-$buf";
  547. }
  548. else {
  549. my $digest = eval
  550. {
  551. require Digest::SHA;
  552. my $ctx = Digest::SHA->new(1);
  553. open my $fh, "<:raw", $progname or die qq[Can't read "$progname": $!];
  554. $ctx->addfile($fh);
  555. close($fh);
  556. $ctx->hexdigest;
  557. } || $mtime;
  558. $stmpdir .= "$Config{_delim}cache-$digest";
  559. }
  560. close($fh);
  561. }
  562. else {
  563. $ENV{PAR_CLEAN} = 1;
  564. $stmpdir .= "$Config{_delim}temp-$$";
  565. }
  566. $ENV{PAR_TEMP} = $stmpdir;
  567. mkdir $stmpdir, 0755;
  568. last;
  569. }
  570. $par_temp = $1 if $ENV{PAR_TEMP} and $ENV{PAR_TEMP} =~ /(.+)/;
  571. }
  572. # check if $name (relative to $par_temp) already exists;
  573. # if not, create a file with a unique temporary name,
  574. # fill it with $contents, set its file mode to $mode if present;
  575. # finaly rename it to $name;
  576. # in any case return the absolute filename
  577. sub _save_as {
  578. my ($name, $contents, $mode) = @_;
  579. my $fullname = "$par_temp/$name";
  580. unless (-e $fullname) {
  581. my $tempname = "$fullname.$$";
  582. open my $fh, '>:raw', $tempname or die qq[Can't write "$tempname": $!];
  583. print $fh $contents;
  584. close $fh;
  585. chmod $mode, $tempname if defined $mode;
  586. rename($tempname, $fullname) or unlink($tempname);
  587. # NOTE: The rename() error presumably is something like ETXTBSY
  588. # (scenario: another process was faster at extraction $fullname
  589. # than us and is already using it in some way); anyway,
  590. # let's assume $fullname is "good" and clean up our copy.
  591. }
  592. return $fullname;
  593. }
  594. # same code lives in PAR::SetupProgname::set_progname
  595. sub _set_progname {
  596. if (defined $ENV{PAR_PROGNAME} and $ENV{PAR_PROGNAME} =~ /(.+)/) {
  597. $progname = $1;
  598. }
  599. $progname ||= $0;
  600. if ($ENV{PAR_TEMP} and index($progname, $ENV{PAR_TEMP}) >= 0) {
  601. $progname = substr($progname, rindex($progname, $Config{_delim}) + 1);
  602. }
  603. if (!$ENV{PAR_PROGNAME} or index($progname, $Config{_delim}) >= 0) {
  604. if (open my $fh, '<', $progname) {
  605. return if -s $fh;
  606. }
  607. if (-s "$progname$Config{_exe}") {
  608. $progname .= $Config{_exe};
  609. return;
  610. }
  611. }
  612. foreach my $dir (split /\Q$Config{path_sep}\E/, $ENV{PATH}) {
  613. next if exists $ENV{PAR_TEMP} and $dir eq $ENV{PAR_TEMP};
  614. $dir =~ s/\Q$Config{_delim}\E$//;
  615. (($progname = "$dir$Config{_delim}$progname$Config{_exe}"), last)
  616. if -s "$dir$Config{_delim}$progname$Config{_exe}";
  617. (($progname = "$dir$Config{_delim}$progname"), last)
  618. if -s "$dir$Config{_delim}$progname";
  619. }
  620. }
  621. sub _fix_progname {
  622. $0 = $progname ||= $ENV{PAR_PROGNAME};
  623. if (index($progname, $Config{_delim}) < 0) {
  624. $progname = ".$Config{_delim}$progname";
  625. }
  626. # XXX - hack to make PWD work
  627. my $pwd = (defined &Cwd::getcwd) ? Cwd::getcwd()
  628. : ((defined &Win32::GetCwd) ? Win32::GetCwd() : `pwd`);
  629. chomp($pwd);
  630. $progname =~ s/^(?=\.\.?\Q$Config{_delim}\E)/$pwd$Config{_delim}/;
  631. $ENV{PAR_PROGNAME} = $progname;
  632. }
  633. sub _par_init_env {
  634. if ( $ENV{PAR_INITIALIZED}++ == 1 ) {
  635. return;
  636. } else {
  637. $ENV{PAR_INITIALIZED} = 2;
  638. }
  639. for (qw( SPAWNED TEMP CLEAN DEBUG CACHE PROGNAME ) ) {
  640. delete $ENV{'PAR_'.$_};
  641. }
  642. for (qw/ TMPDIR TEMP CLEAN DEBUG /) {
  643. $ENV{'PAR_'.$_} = $ENV{'PAR_GLOBAL_'.$_} if exists $ENV{'PAR_GLOBAL_'.$_};
  644. }
  645. my $par_clean = "__ENV_PAR_CLEAN__ ";
  646. if ($ENV{PAR_TEMP}) {
  647. delete $ENV{PAR_CLEAN};
  648. }
  649. elsif (!exists $ENV{PAR_GLOBAL_CLEAN}) {
  650. my $value = substr($par_clean, 12 + length("CLEAN"));
  651. $ENV{PAR_CLEAN} = $1 if $value =~ /^PAR_CLEAN=(\S+)/;
  652. }
  653. }
  654. sub outs {
  655. return if $quiet;
  656. if ($logfh) {
  657. print $logfh "@_\n";
  658. }
  659. else {
  660. print "@_\n";
  661. }
  662. }
  663. sub init_inc {
  664. require Config;
  665. push @INC, grep defined, map $Config::Config{$_}, qw(
  666. archlibexp privlibexp sitearchexp sitelibexp
  667. vendorarchexp vendorlibexp
  668. );
  669. }
  670. ########################################################################
  671. # The main package for script execution
  672. package main;
  673. require PAR;
  674. unshift @INC, \&PAR::find_par;
  675. PAR->import(@par_args);
  676. die qq[par.pl: Can't open perl script "$progname": No such file or directory\n]
  677. unless -e $progname;
  678. do $progname;
  679. CORE::exit($1) if ($@ =~/^_TK_EXIT_\((\d+)\)/);
  680. die $@ if $@;
  681. };
  682. $::__ERROR = $@ if $@;
  683. }
  684. CORE::exit($1) if ($::__ERROR =~/^_TK_EXIT_\((\d+)\)/);
  685. die $::__ERROR if $::__ERROR;
  686. 1;
  687. #line 1006
  688. __END__
  689. PK

下一步是分组,分为对照组和实验组(简单来说就是癌症和非癌症一组)

先复制一份probe.txt副本,里面有病人的临床数据

将病人的临床信息复制一份

 

在目录下新建clincal.xlsx,将临床信息复制进去

 

 选择选择性粘贴,选择转置,然后点击确定

 

找到ID和病人情况两列,只要这两列

 进行排序,并且将对照组的病人id复制到一个新的空白的名为s1的txt中

将实验组组的病人id复制到一个新的空白的名为s2的txt中

 

 

准备完毕!!! 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/235912
推荐阅读
  

闽ICP备14008679号