Skip to content

Instantly share code, notes, and snippets.

View LeeBergstrand's full-sized avatar

Lee Bergstrand LeeBergstrand

View GitHub Profile
@LeeBergstrand
LeeBergstrand / FastaMLtoSL.py
Last active December 10, 2022 17:33
Python script that converts FASTA files with multiline sequences (wrapped) to FASTAs files with single line sequences (unwrapped).
#!/usr/bin/env python
# Created by: Lee Bergstrand
# Descript: Converts multiline FASTAs to single line FASTAs
#
# Usage: FastaMLtoSL.py <sequences.faa>
# Example: FastaMLtoSL.py mySeqs.faa
#----------------------------------------------------------------------------------------
#===========================================================================================================
#Imports:
@LeeBergstrand
LeeBergstrand / CSVMod.py
Created February 17, 2014 01:02
A simple python script to modify any element or group of elements in a CSV file using a Regex.
#!/usr/bin/env python
# Created by: Lee Bergstrand
# Descript: A simple script that modifies the elements inside a column of a CSV by
# using a regular expression to find and replace charaters in those elements.
#
# Usage: CSVmod.py <input.csv> <output.csv> <columnNumber> <regex> <replace>
# Example: CSVmod.py myInput.csv myOutput.csv 6 ^[\t]+|[\t]$ replacement
#----------------------------------------------------------------------------------------
import csv