annotate cut_degen.py @ 0:716cdcccc919 draft default tip

planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
author megan-shortridge
date Tue, 15 Sep 2015 14:14:41 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
1 #This is a version that is meant to work with Fastq files
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
2 import Bio
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
3 from Bio import SeqUtils
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
4 from Bio import SeqIO
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
5 import sys
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
6
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
7
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
8 #for records and adapter, should be sys.argv[1 and 2]
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
9 fastqfile = sys.argv[1] #This is the input fasta file
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
10 adapter = sys.argv[2] #This is the input adapter as a string
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
11 keepreads = sys.argv[3] #True or false, this will determine whether or not reads are kept. If true, it will keep reads that do not have the adapter in it. If false, it will get rid of those reads.
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
12 removeadapters = sys.argv[4] #True or false, if this is True, the adapters will be removed. If true, removes the adapters from the sequences. If false, it keeps them.
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
13 end_defn = sys.argv[5] #If 5, the primer is removed from the 5' end of the sequence. If 3, then it is removed from the 3' end of the sequence.
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
14 adapter_name = sys.argv[6] #This is the name of the adapter that you can put into the output text file.
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
15
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
16
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
17 # Here is the command for the test: python cut_degen.py 'test.fastq' 'GAACWAYWYCT' 'True' 'True' '5' 'test'
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
18
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
19 keepreads = str(keepreads)
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
20 removeadapters = str(removeadapters)
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
21 fastqfile=str(fastqfile)
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
22 end_defn = str(end_defn)
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
23
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
24 fh = open(fastqfile, mode='r+')
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
25 len_adapter = len(adapter)
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
26 count_adapter_found = 0
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
27 count_adapter_not_found = 0
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
28 total_seq_count = 0
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
29
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
30 parsed = SeqIO.parse(fh, format="fastq")
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
31
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
32 output_fh_name = "output.fastq"
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
33
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
34 if fastqfile=="test3prime.fastq":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
35 output_fh_name="output2.fastq"
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
36
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
37 output_fh = open(output_fh_name, mode='w+')
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
38
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
39 output_text_name = "output.txt"
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
40 if fastqfile=="test3prime.fastq":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
41 output_text_name="output2.txt"
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
42 output_text_fh = open(output_text_name, mode='w+')
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
43
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
44
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
45 for record in parsed:
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
46 try:
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
47 sequence = str(record.seq)
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
48 search = SeqUtils.nt_search(sequence, adapter) #This will search the
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
49 index = int(search[1]) #If it finds the adapter, is the starting index from which it was found.
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
50 adapter_start = index
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
51 adapter_end = index+len_adapter
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
52 count_adapter_found +=1
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
53 total_seq_count+=1
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
54 if removeadapters == "True": #if the value is true, it removes the adapters from the sequences.
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
55 if end_defn=="5":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
56 record = record[adapter_end:] #If a 5' adapter, you remove adapter from beginning
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
57 elif end_defn=="3":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
58 record = record[:adapter_start] #If it is a 3' adapter, you remove the adapter at the end
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
59 elif removeadapters == "False": #if the value is false, it does not remove the adapters from the sequences.
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
60 record = record
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
61 SeqIO.write(record, output_fh, format="fastq") #No matter what, write the reads.
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
62 except IndexError:
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
63 count_adapter_not_found+=1
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
64 total_seq_count+=1
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
65 record = record
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
66 if keepreads=="True":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
67 SeqIO.write(record, output_fh, format="fastq")
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
68 elif keepreads=="False":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
69 pass
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
70 else:
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
71 pass
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
72
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
73 output_fh.close()
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
74
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
75 percent_cut = 100*(float(count_adapter_found)/float(total_seq_count))
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
76
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
77
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
78 output_text_fh.write("The total number of sequences that were analyzed was %i.\n\n"%total_seq_count)
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
79 output_text_fh.write("Adapter was found and removed for %i sequences (%i%% of total).\n\n"%(count_adapter_found, percent_cut))
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
80
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
81 if keepreads =="True":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
82 output_text_fh.write("Sequences that did not contain the adapter were kept.\n\n")
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
83 elif keepreads=="False":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
84 output_text_fh.write("Sequences that did not contain the adapter were removed from the dataset.\n\n")
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
85 if removeadapters=="True":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
86 output_text_fh.write("The adapters were removed from the dataset.\n\n")
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
87 elif removeadapters=="False":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
88 output_text_fh.write("The adapters were not removed from the dataset.\n\n")
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
89 if end_defn=="5":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
90 output_text_fh.write("Adapters were removed from the 5\' end.\n\n")
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
91 elif end_defn=="3":
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
92 output_text_fh.write("Adapters were removed from the 3\'end.\n\n")
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
93
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
94 output_text_fh.write("The name of the adapter that was removed was named %s, and had the sequence %s.\n\n"%(adapter_name,adapter))
716cdcccc919 planemo upload for repository https://github.com/mshortr/degenerateprimerremoval_fastq commit 7d51a7e3ccb0164b530bf1664068d86241f2f2f5-dirty
megan-shortridge
parents:
diff changeset
95 output_text_fh.close()