Skip to content

Commit

Permalink
Merge branch 'main' of github.com:faircloth-lab/phyluce
Browse files Browse the repository at this point in the history
  • Loading branch information
brantfaircloth committed Jun 10, 2024
2 parents a497302 + cde8fe9 commit 2beedcc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.6

Expand Down
13 changes: 8 additions & 5 deletions bin/assembly/phyluce_assembly_explode_get_fastas_file
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ def get_args():
help="""Split file by taxon and not by locus""",
)
parser.add_argument(
"--split-char", type=str, default="_", help="""The character to split on"""
"--split-char",
type=str,
default="_",
help="""The character to split on""",
)
return parser.parse_args()

Expand All @@ -66,13 +69,13 @@ def main():
os.makedirs(args.output)
print("Reading fasta...")
if not args.by_taxon:
with open(args.input, "rU") as input:
for seq in SeqIO.parse(input, "fasta"):
with open(args.input, "rU") as input_file:
for seq in SeqIO.parse(input_file, "fasta"):
uce = seq.id.split(args.split_char)[0]
seqdict[uce].append(seq)
elif args.by_taxon:
with open(args.input, "rU") as input:
for seq in SeqIO.parse(input, "fasta"):
with open(args.input, "rU") as input_file:
for seq in SeqIO.parse(input_file, "fasta"):
taxon = "-".join(seq.id.split(args.split_char)[1:])
seqdict[taxon].append(seq)
print("Writing fasta...")
Expand Down
2 changes: 1 addition & 1 deletion phyluce/tests/test_match_contigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,6 @@ def test_match_contigs_to_barcodes(o_dir, e_dir, request):
re.search("(Best.*\n)", stdout.decode("utf-8")).groups()[0].strip()
)
assert (
"Best BOLD systems match for locus comp17283_c0_seq1: Anas poecilorhyncha [GBIR3505-13]"
"Best BOLD systems match for locus comp17283_c0_seq1: Anas platyrhynchos [TZBNA296-03]"
in observed
)

0 comments on commit 2beedcc

Please sign in to comment.