Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts updated #64

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bin/busco_2_table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/python3

# Written by Chris Wyatt and released under the MIT license.
# Converts a group of busco outputs to a table to plot on a tree

import pandas as pd
import argparse

Expand Down
16 changes: 7 additions & 9 deletions bin/fasta_topIsoform.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/perl

# Written by Chris Wyatt and released under the MIT license.
# Extract isoform from a list of isoforms you want to get

use warnings;
use strict;
use Getopt::Std;
Expand All @@ -11,19 +15,17 @@
my $outfile="$fastafile\.nucl.longest.fa";

open(my $outhandle, ">", $outfile) or die "Could not open $outfile \n";

open(my $inhandle, "<", $hitlist) or die "Could not open $hitlist \n";



use Bio::SeqIO;
my $seqio = Bio::SeqIO->new(-file => "$fastafile", '-format' => 'Fasta');
my %fastadictionary=();
my @headersplit=();


while (my $seq = $seqio->next_seq){ ## selects one sequence at a time
## set variables for THIS sequence
while (my $seq = $seqio->next_seq){
## selects one sequence at a time
## set variables for THIS sequence
my $id = $seq->display_id;
my $string = $seq->seq;
$id=~ s/rna-//g;
Expand All @@ -49,7 +51,3 @@
$HIT{$sp[1]}="y";
$len_prots++;
}




6 changes: 2 additions & 4 deletions bin/gff_to_genetranshash.2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
use warnings;
use strict;

# Written by Chris Wyatt and released under the MIT license.
# Converts gff file to a hash of genes

print "Please be in folder with *noquest.gff3 file\n\n";


my $in_gfffile=`ls *noquest.gff3`;
chomp $in_gfffile;
my @namesplit=split(/\./, $in_gfffile);
Expand Down Expand Up @@ -39,7 +40,6 @@
#print "$line\n";
if ($split[2] eq "mRNA"){
my $length=$split[4]-$split[3];

#Do different split if AUGUSTUS or NCBI
if ($split[1] eq "AUGUSTUS"){
#Its an AUGUSTUS GFF
Expand Down Expand Up @@ -97,7 +97,6 @@
$Gene_tran_hash{$gene}=$tran;
}


#Add to longest, if longest
if ($longest{$gene}){
my @old=split("\t", $longest{$gene});
Expand All @@ -109,7 +108,6 @@
$longest{$gene}="$tran\t$length";
}


}
}
}
Expand Down
89 changes: 0 additions & 89 deletions bin/gff_to_genetranshash.pl

This file was deleted.

2 changes: 1 addition & 1 deletion bin/gtf2gff.pl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/perl
#
# Script taken from : https://github.com/Gaius-Augustus/Augustus/blob/955ce1731e9bdd1c670216ed3c514f978c033891/scripts/gtf2gff.pl
# format convert a gtf file
#
# This script is used by the braker.pl pipeline.
Expand Down
4 changes: 4 additions & 0 deletions bin/plot_tree_summary.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/Rscript

# Written by Chris Wyatt and released under the MIT license.
# Prints a tree with QUAST N50 results on tips of branches

# Load necessary libraries
if (!requireNamespace("argparse", quietly = TRUE)) {
install.packages("argparse")
Expand Down
4 changes: 4 additions & 0 deletions bin/plot_tree_summary2.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/Rscript

# Written by Chris Wyatt and released under the MIT license.
# Plots the phylogenetic tree with BUSCO result in pie charts

# Load necessary libraries
if (!requireNamespace("argparse", quietly = TRUE)) {
install.packages("argparse")
Expand Down
8 changes: 5 additions & 3 deletions bin/prot_fasta_to_longest.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/perl

# Written by Chris Wyatt and released under the MIT license.
# Prints out longest unique protein

use warnings;
use strict;
use lib '/opt/conda/lib/perl5/site_perl';
Expand Down Expand Up @@ -42,7 +46,7 @@


while (my $seq = $seqio->next_seq){ ## selects one sequence at a time
## set variables for THIS sequence
## set variables for THIS sequence
my $id = $seq->id;
chomp $id;
print "here $id\n";
Expand All @@ -57,8 +61,6 @@
if ($longest{$id}){
print $outhandle ">$iso2gene{$id}\n$string\n";
}


}


Expand Down
3 changes: 3 additions & 0 deletions bin/quast_2_table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/python3

# Written by Chris Wyatt and released under the MIT license. Converts a group of quast outputs to a table to plot on a tree

import pandas as pd
import argparse
import os
Expand Down