Skip to content

Instantly share code, notes, and snippets.

View eskutkaan's full-sized avatar

Kaan Ihsan Eskut eskutkaan

  • University of Kentucky
  • Lexington, KY
View GitHub Profile
library(dplyr)
library(tibble)
data = read.csv("gene_count_matrix.csv", row.names = "gene_id")
head(data)
log_data = log(data)
head(log_data)
log_data = log_data %>%
rownames_to_column('gene') %>%
@eskutkaan
eskutkaan / wip_suffix_search.c
Created July 8, 2024 16:16
wip_suffix_search
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Function to compare suffixes for qsort
int suffix_compare(const void *a, const void *b) {
return strcmp(*(const char **)a, *(const char **)b);
}
// Function to construct the suffix array
#!/usr/bin/env python3
# Usage
# python3 filter_fasta_by_list_of_headers.py [fasta.file] [header.list] > [output.file]
from Bio import SeqIO
import sys
#!/usr/bin/env python3
import argparse
import csv
import natsort
import pandas
# Parse arguments
parser = argparse.ArgumentParser()
parser.add_argument(
# Define a function to extract the value of a specified attribute
def extract_attribute_value(line, attribute):
start = line.find(attribute) + len(attribute) + 2 # +2 to skip the attribute name and the initial space
end = line.find('";', start)
return line[start:end]
# Read the input file
input_filename = "trial.gtf"
output_filename = "output_trial.gtf"