Skip to content

Instantly share code, notes, and snippets.

View FranjoIM's full-sized avatar
🏠
Working from home

Franjo Ivankovic, PhD FranjoIM

🏠
Working from home
View GitHub Profile
@FranjoIM
FranjoIM / summary.sh
Created October 14, 2021 19:35
This gist takes a desired file, extracts desired column, and returns a list of unique values with counts.
awk -F ',' '{print $<column_number>}' <file> | sort | uniq -c
@FranjoIM
FranjoIM / TSLinkage.csv
Created December 7, 2020 11:00
TS Disorders Linkage Studies
Chromosomal Location Summary Reference
@FranjoIM
FranjoIM / GatekeeperBypass.sh
Created July 15, 2020 21:55
Avoid MacOS Gatekeeper check for a specific file
xattr -d com.apple.quarantine file_name
@FranjoIM
FranjoIM / index.html
Created April 12, 2020 17:44
Progress bars (CSS & HTML)
<h3> A standalone progress bar </h3>
<div class="fprogress" >
<div class="fprogress-bar" id="fA" style="width:90%"> <!-- Edit progress % here -->
<div class="fbox" id="fA" style="width: 232px"> <!-- Edit shaded area here -->
<span class="ftext">A Standalone Progress Bar</span>
</div>
</div>
</div>
@FranjoIM
FranjoIM / VLOOKUP.R
Created April 8, 2020 04:25
VLOOKUP in R: This function allows to fill one table using the values from another table
# Load a library necessary to run this code
library(plyr)
# Run the code on the dataframes
CombinedDF <- join(MainDF, LookUpDF, by = "Column")
head(CombinedDF)
@FranjoIM
FranjoIM / DNAReverseComplement.R
Created April 8, 2020 04:23
DNA Reverse Complement: This function takes a string-type variable containing DNA and it returns its reverse complement
# Load a library necessary to run this code
library(stringi)
# Define the reverse complement function
rev.comp <- function(DNASeq)
return(stri_reverse(chartr("acgtACGT", "tgcaTGCA", DNASeq)))
# Run the code on the dataframe called DF
DF$Seq <- ifelse (DF$Strand == c("-"), rev.comp(DF$Seq), DF$Seq)
library(plyr)