Skip to content

Commit e71b002

Browse files
authored
Merge pull request #27 from andrewjpage/update_url_issue_26
Update url issue 26
2 parents a4ff3eb + fc33f25 commit e71b002

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.1
1+
1.0.2

tiptoft/Fastq.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,12 @@ def read_filter_and_map(self):
8383
r += 1
8484
fh.close()
8585

86-
self.full_gene_coverage(counter)
86+
alleles = self.full_gene_coverage(counter)
8787
self.logger.info("Number of reads: "+str(counter))
8888
self.logger.info("Number of matching reads: " +
8989
str(match_counter)+"\t"+str(f)+"\t"+str(r))
90+
91+
print("\t".join([self.filename, str(len(alleles)), str(match_counter), str(counter), str(match_counter*100/counter)]))
9092

9193
return self
9294

tiptoft/RefGenesGetter.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,14 @@ def _get_from_plasmidfinder(self, outprefix):
3636
except Error:
3737
raise Error('Error mkdir/chdir ' + tmpdir)
3838

39-
cmd = 'curl -o enterobacteriaceae.fsa https://bitbucket.org/' \
40-
'genomicepidemiology/plasmidfinder_db/raw/'\
41-
'master/enterobacteriaceae.fsa'
42-
print('Downloading data with:', cmd, sep='\n')
43-
subprocess.check_call(cmd, shell=True)
39+
files_to_download = ['enterobacteriaceae.fsa', 'Inc18.fsa', 'NT_Rep.fsa', 'Rep1.fsa', 'Rep2.fsa', 'Rep3.fsa', 'RepA_N.fsa', 'RepL.fsa', 'Rep_trans.fsa']
4440

45-
cmd = 'curl -o gram_positive.fsa https://bitbucket.org/'\
46-
'genomicepidemiology/plasmidfinder_db/raw/master/gram_positive.fsa'
47-
print('Downloading data with:', cmd, sep='\n')
48-
subprocess.check_call(cmd, shell=True)
41+
for f in files_to_download:
42+
cmd = 'curl -o '+str(f)+' https://bitbucket.org/' \
43+
'genomicepidemiology/plasmidfinder_db/raw/'\
44+
'master/'+str(f)
45+
print('Downloading data with:', cmd, sep='\n')
46+
subprocess.check_call(cmd, shell=True)
4947

5048
print('Combining downloaded fasta files...')
5149
fout_fa = pyfastaq.utils.open_file_write(final_fasta)

tiptoft/TipToft.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def __init__(self, options):
3636
self.plasmid_data = str(pkg_resources.resource_filename(
3737
__name__, 'data/plasmid_data.fa'))
3838

39-
if self.output_file and os.path.exists(self.output_file):
40-
self.logger.error(
41-
"The output file already exists, "
42-
"please choose another filename: "
43-
+ self.output_file)
44-
sys.exit(1)
39+
#if self.output_file and os.path.exists(self.output_file):
40+
# self.logger.error(
41+
# "The output file already exists, "
42+
# "please choose another filename: "
43+
# + self.output_file)
44+
# sys.exit(1)
4545

4646
if(self.filtered_reads_file and
4747
os.path.exists(self.filtered_reads_file)):

0 commit comments

Comments
 (0)