Merging BED with v62 dataset with Google Colab
#31
(04-09-2025, 05:23 PM)TanTin Wrote:
(04-09-2025, 05:18 PM)Inquirer Wrote:
(04-09-2025, 03:49 PM)TanTin Wrote: You need to be very patient with this.. Some operations may take many many hours.
Processing some data may take up to day or 2.

It's not a matter of time; it's a matter of my computer seemingly not being able to complete the conversion process due to limited RAM.

Yess. I forgot to tell you that RAM is very important.. I have only 16 GB Ram on my PC. If you have 8 GB - it's not enough.
On the same computer I run VM (virtual machine) for Linux, where I do the conversion.

I have 64 GBs of DDR4 RAM.
Reply
#32
(04-09-2025, 05:38 PM)Inquirer Wrote:
(04-09-2025, 05:23 PM)TanTin Wrote:
(04-09-2025, 05:18 PM)Inquirer Wrote: It's not a matter of time; it's a matter of my computer seemingly not being able to complete the conversion process due to limited RAM.

Yess. I forgot to tell you that RAM is very important.. I have only 16 GB Ram on my PC. If you have 8 GB - it's not enough.
On the same computer I run VM (virtual machine) for Linux, where I do the conversion.

I have 64 GBs of DDR4 RAM.
OK, you have more resources than me. Try to optimize.. 
No need to do the conversion eigenstrat-plink.. Just download the dataset that Aimsmall shared the link.
Reply
#33
(04-09-2025, 05:41 PM)TanTin Wrote:
(04-09-2025, 05:38 PM)Inquirer Wrote:
(04-09-2025, 05:23 PM)TanTin Wrote: Yess. I forgot to tell you that RAM is very important.. I have only 16 GB Ram on my PC. If you have 8 GB - it's not enough.
On the same computer I run VM (virtual machine) for Linux, where I do the conversion.

I have 64 GBs of DDR4 RAM.
OK, you have more resources than me. Try to optimize.. 
No need to do the conversion eigenstrat-plink.. Just download the dataset that Aimsmall shared the link.

I've downloaded it. What now?
Reply
#34
One of us could merge it for you. The challenge is where to deliver it to you that has space.

You find a place to receive the results, and I'm sure one of us could merge it for you.
Reply
#35
But, it's a good skill and knowledge to have so if you can do it you'd be able to use that going forward in the future when you'd like to add other samples to your dataset.
Reply
#36
(04-09-2025, 05:48 PM)AimSmall Wrote: One of us could merge it for you.  The challenge is where to deliver it to you that has space.

You find a place to receive the results, and I'm sure one of us could merge it for you.

Hold on a second. I'll try it myself first.
Reply
#37
(04-09-2025, 05:49 PM)AimSmall Wrote: But, it's a good skill and knowledge to have so if you can do it you'd be able to use that going forward in the future when you'd like to add other samples to your dataset.

> system("plink2 --bfile Takarkori_trimmed --bmerge v62_AADR_1240K --out merged_file")
PLINK v2.0.0-a.6.9 64-bit (29 Jan 2025)            cog-genomics.org/plink/2.0/
© 2005-2025 Shaun Purcell, Christopher Chang  GNU General Public License v3
Logging to merged_file.log.
Options in effect:
  --bfile Takarkori_trimmed
  --bmerge v62_AADR_1240K
  --out merged_file

Start time: Wed Apr 09 13:54:50 2025
Error: --bmerge is retired.  Use --pmerge instead.
For more info, try "plink2 --help <flag name>" or "plink2 --help | more".
[1] 8
> system("plink2 --bfile Takarkori_trimmed --pmerge v62_AADR_1240K --out merged_file")
PLINK v2.0.0-a.6.9 64-bit (29 Jan 2025)            cog-genomics.org/plink/2.0/
© 2005-2025 Shaun Purcell, Christopher Chang  GNU General Public License v3
Logging to merged_file.log.
Options in effect:
  --bfile Takarkori_trimmed
  --out merged_file
  --pmerge v62_AADR_1240K

Start time: Wed Apr 09 13:55:02 2025
65444 MiB RAM detected; reserving 32722 MiB for main workspace.
Using up to 32 threads (change this with --threads).
End time: Wed Apr 09 13:55:02 2025
Error: Failed to open v62_AADR_1240K.psam : No such file or directory.
[1] 3


Attached Files Thumbnail(s)
   
Reply
#38
https://genarchivist.net/showthread.php?...1#pid18281

Review this thread.
Inquirer likes this post
Reply
#39
Please download PLINK 1.9 and try the same .
plink 2 and plink 1.9 are very different from one another, using different options.

For some tasks I use 1.9. for other 2.0.
Archetype0ne and Inquirer like this post
Reply
#40
(04-09-2025, 05:49 PM)AimSmall Wrote: But, it's a good skill and knowledge to have so if you can do it you'd be able to use that going forward in the future when you'd like to add other samples to your dataset.

The questions he is asking are very good. So I hope this will help also other users to get such experience.
Reply
#41
(04-09-2025, 06:07 PM)TanTin Wrote: Please download PLINK 1.9  and try the same .
plink 2 and plink 1.9 are very different from one another, using different options.

For some tasks I use 1.9. for other 2.0.

Thanks. That helped.

   
Reply
#42
(04-09-2025, 06:23 PM)Inquirer Wrote:
(04-09-2025, 06:07 PM)TanTin Wrote: Please download PLINK 1.9  and try the same .
plink 2 and plink 1.9 are very different from one another, using different options.

For some tasks I use 1.9. for other 2.0.

Thanks. That helped.

Great! Now you have it .
Inquirer likes this post
Reply
#43
(04-09-2025, 06:28 PM)TanTin Wrote:
(04-09-2025, 06:23 PM)Inquirer Wrote:
(04-09-2025, 06:07 PM)TanTin Wrote: Please download PLINK 1.9  and try the same .
plink 2 and plink 1.9 are very different from one another, using different options.

For some tasks I use 1.9. for other 2.0.

Thanks. That helped.

Great! Now you have it .

What can I use to read the .bed, .bim, and .fam files? I want to look at them so that I can select targets, left pops, and right pops.
Reply
#44
(04-09-2025, 06:35 PM)Inquirer Wrote: What can I use to read the .bed, .bim, and .fam files? I want to look at them so that I can select targets, left pops, and right pops.

for .fam .bim you may use notepad or notepad++, or any text editors.
For bed - it is binary file, compressed. You can't look at it.
If you want to see it you will need to convert it to ped file, so it's another story.
Inquirer likes this post
Reply
#45
Also be careful: do not try to open 3 GB file in your text editor. As you may need to reboot your computer afer. Notepad ++ is much better than Notepad for large files. Text editors may open files for up to few megabites, but do not try on gigabite file.
Inquirer likes this post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)