This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Modified from Greg Caporaso's code in qiime/split_libraries_fastq.py | |
# Usage: python compare_fastq_labels.py fastq1_fp fastq2_fp | |
from itertools import izip | |
from sys import argv | |
from cogent.parse.fastq import MinimalFastqParser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" Used to reverse a qual score sequence, which may be needed in cases of | |
paired fasta/qual files. | |
Requires QIIME installed to use (created with 1.7.0dev) | |
Usage: | |
python reverse_qual_scores.py X Y | |
where X is qual scores filepath, Y is output reversed filepath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Usage: | |
# python parse_bcs_from_fastq_labels.py X Y Z A | |
# where X is input fastq file, Y is output barcode reads file, | |
# Z is character to split on in label (use quote characters), and A is number of characters to trim from the end of the label (0 for none) | |
# This assumes barcode is at the end of the label, and the number of characters following it are consistent | |
""" Example sequence, would use: python parse_bcs_from_fastq_labels.py fastq_fp bc_reads.fastq '#' 2 to generate barcodes | |
@MCIC-SOLEXA_0051_FC:1:1:14637:1026#CGATGT/1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from sys import argv | |
from cogent.parse.fastq import MinimalFastqParser | |
from cogent import DNA | |
f = open(argv[1], "U") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from sys import argv | |
from itertools import izip | |
from cogent.parse.fastq import MinimalFastqParser | |
# Usage: python combine_fastq_barcodes X Y Z | |
# where X is the first input fastq barcodes file, Y is the second fastq | |
# barcodes file, and Z is the output combined fastq barcodes file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from sys import argv | |
from cogent.parse.fasta import MinimalFastaParser | |
from cogent import DNA | |
""" | |
Requires PyCogent installation. This should be present if you have QIIME | |
installed. If you are using MacQIIME, initialize the environment by calling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" Usage | |
python extract_bcs_from_fastq_ends.py X Y Z A B C D E | |
Where | |
X: input fastq file with barcodes at the beginning and ends of the reads | |
Y: output fastq barcodes file | |
Z: output reads fastq file (with barcodes removed) | |
A: length of forward barcode (int) | |
B: length of reverse barcode (int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" Usage | |
python truncate_seq_lens.py X Y Z A | |
where | |
X is input fasta file | |
Y is the minimum sequence length (discards reads shorter than this) | |
Z is the maximum sequence length (discards reads longer than this) | |
A is target truncation length | |
B is output fasta file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from sys import argv | |
from itertools import izip | |
from cogent.parse.fastq import MinimalFastqParser | |
""" Usage | |
python merge_bcs_reads.py X Y Z | |
X: barcodes fastq file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" Usage: | |
python split_fasta_qual_seqs.py X Y Z A B C D | |
where | |
X - input fasta file | |
Y - input qual file | |
Z - Number of seqs to write to first file, remaining will be written to second | |
A - first output fasta file | |
B - second output fasta file |
OlderNewer