Skip to content

Instantly share code, notes, and snippets.

@mcanouil
mcanouil / draw_manhattan.R
Last active August 9, 2022 11:48
Manhattan Plot
# # MIT License
#
# Copyright (c) Mickaël Canouil
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@variani
variani / convert-formats.sh
Last active September 16, 2024 00:58
plink commands
# ------------------
# from bgen to bed
# ------------------
plink2 --bgen myfile.bgen \
# filter by chr or by snps names
--chr 1 --extract {params.snps} \
--make-bed --out myoutput
# 1. plink will create temporary/intermediate files such as *-temporary.{pgen,psam,pvar}
# 2. sample ids in .fam will be `ID1_ID1`
@sinarueeger
sinarueeger / extract-genetic-data.md
Last active March 13, 2024 14:21
Extract data for single SNPs from large genetic datasets
@dlfinis
dlfinis / examples-sed
Last active March 3, 2024 04:01
Examples of Sed' Use
The syntax of sed command replacement is:
$ sed 's/find/replace/' file
This sed command finds the pattern and replaces with another pattern. When the replace is left empty, the pattern/element found gets deleted.
Let us consider a sample file as below:
$ cat file
Linux