Mercurial > repos > charles_s_test > test_dependencies
diff runfastq_dump.py @ 2:aca83a94fd55 draft default tip
planemo upload commit cd1454c40a43ad9da3d59e6ba8359318fc772c43-dirty
| author | charles_s_test |
|---|---|
| date | Thu, 25 Jan 2018 17:26:32 -0500 |
| parents | 09e4f955e00a |
| children |
line wrap: on
line diff
--- a/runfastq_dump.py Sun Nov 12 09:14:07 2017 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -import sys, os - -input = sys.argv[1] - -print(input) - -import re, os - -def fix_seq_ids(filename): - ''' - make sequence ids the same for paired reads. - ''' - file = list(open(filename, 'r')) - new_file = open(filename, 'w') - for line in file: - if re.search('^@', line) or re.search('^\+', line) and re.search(' ', line): - linel = re.split(' ', line) - linel[0] = re.sub('.\d$', '', linel[0]) - line = ' '.join(linel) - new_file.write(line) -# fastq-dump --log-level fatal --split-3 --accession accession_number --ncbi_error_report never - -os.system('/nfs/sw/apps/sratoolkit/sratoolkit.2.8.0-centos_linux64/bin/fastq-dump --log-level fatal --split-3 --accession ' + input + ' --ncbi_error_report never') - -os.system('ls -lh | grep ' + input) - -#os.system('/nfs/sw/apps/sratoolkit/sratoolkit.2.8.0-centos_linux64/bin/fastq-dump -I --split-files ' + input) -#mv_cmd = 'mv -v ' + input + '_1.fastq R1.fastq' -#print(mv_cmd) - -#fix_seq_ids(input + '_1.fastq') -#fix_seq_ids(input + '_2.fastq') - -os.system('mv -v ' + input + '_1.fastq R1.fastq') -os.system('mv -v ' + input + '_2.fastq R2.fastq') - - -
