Skip to content

Instantly share code, notes, and snippets.

View brantfaircloth's full-sized avatar

Brant Faircloth brantfaircloth

View GitHub Profile
@brantfaircloth
brantfaircloth / contig_cov.py
Created May 9, 2024 20:04
Contig coverage from PB.cov
#!/usr/bin/env python
# encoding: utf-8
"""
Created by Brant Faircloth on May 9, 2024 at 14:00:38 CDT
Copyright (c) 2024 Brant C. Faircloth. All rights reserved.
Description:
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
(c) 2020 Brant Faircloth || http://faircloth-lab.org/
All rights reserved.
This code is distributed under a 3-clause BSD license. Please see
LICENSE.txt for more information.
@brantfaircloth
brantfaircloth / arks-make.txt
Created June 12, 2019 17:04
arks-make updated
#!/usr/bin/make -f
# Pipeline for the ARKS program
# Written by Jeffrey Tse
# w/ small updated by Brant Faircloth
#Default Parameters
# Input Names
@brantfaircloth
brantfaircloth / compute_parsimony_sites.py
Created January 31, 2018 15:24
Compute parsimony scores (as in Alfaro et al. 2018)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
(c) 2015 Brant Faircloth || http://faircloth-lab.org/
All rights reserved.
This code is distributed under a 3-clause BSD license. Please see
LICENSE.txt for more information.
@brantfaircloth
brantfaircloth / ll_parse_and_sort.sh
Created December 1, 2017 19:44
Parse and sort LogLik values from ExaML log file
#/bin/bash
rm -rf log-likelihoods.txt && for i in ExaML_info.*; do result=$(cat $i | grep "Likelihood of best tree"); echo $i $result | tr [:blank:] \\t >> log-likelihoods.txt; done && sort -nrk 6,6 log-likelihoods.txt
@brantfaircloth
brantfaircloth / snippet.pl
Created August 17, 2017 20:19
Convert from paml/mcmctree dates to regular dates
# be sure to remove all of `<paste newick of tree here>`
perl -e'print"<paste newick of tree here>"' | perl -i10 -pe's/\d+\.\d+/$&*$^I/ge'
@brantfaircloth
brantfaircloth / merge.sh
Created March 8, 2017 16:49
Merging multiple PDF files
/usr/local/bin/gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile=out.pdf 1.pdf 2.pdf 3.pdf 4.pdf 5.pdf 6.pdf 7.pdf 8.pdf 9.pdf 10.pdf
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
(c) 2016 Brant Faircloth || http://faircloth-lab.org/
All rights reserved.
This code is distributed under a 3-clause BSD license. Please see
LICENSE.txt for more information.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
(c) 2016 Brant Faircloth || http://faircloth-lab.org/
All rights reserved.
This code is distributed under a 3-clause BSD license. Please see
LICENSE.txt for more information.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
(c) 2016 Brant Faircloth || http://faircloth-lab.org/
All rights reserved.
This code is distributed under a 3-clause BSD license. Please see
LICENSE.txt for more information.