from django.db.models.signals import post_init
from htsworkflow.frontend.samples.models import Library
-from htsworkflow.frontend.samples.results import parse_flowcell_id
+from htsworkflow.util.conversion import parse_flowcell_id
from htsworkflow.pipelines import runfolder
logger = logging.getLogger(__name__)
pass
-def parse_flowcell_id(flowcell_id):
- """
- Return flowcell id and any status encoded in the id
-
- We stored the status information in the flowcell id name.
- this was dumb, but database schemas are hard to update.
- """
- fields = flowcell_id.split()
- fcid = None
- status = None
- if len(fields) > 0:
- fcid = fields[0]
- if len(fields) > 1:
- status = fields[1]
- return fcid, status
-
from htsworkflow.frontend.experiments.models import FlowCell, Lane, LANE_STATUS_MAP
from htsworkflow.frontend.samples.changelist import ChangeList
from htsworkflow.frontend.samples.models import Library, Species, HTSUser
-from htsworkflow.frontend.samples.results import get_flowcell_result_dict, parse_flowcell_id
+from htsworkflow.frontend.samples.results import get_flowcell_result_dict
from htsworkflow.frontend.bcmagic.forms import BarcodeMagicForm
from htsworkflow.pipelines.runfolder import load_pipeline_run_xml
from htsworkflow.pipelines import runfolder
from htsworkflow.pipelines.eland import ResultLane
-from htsworkflow.util.conversion import unicode_or_none
+from htsworkflow.util.conversion import unicode_or_none, parse_flowcell_id
from htsworkflow.util import makebed
from htsworkflow.util import opener
# open the srf, fastq, or compressed fastq
if is_srf(args[0]):
- source = srf_open(args[0])
+ source = srf_open(args[0], opts.cnf1)
else:
source = autoopen(args[0])
help="show information about what we're doing.")
parser.add_option('--version', default=False, action="store_true",
help="Report software version")
+ parser.add_option('--cnf1', default=False, action="store_true",
+ help="Force cnf1 mode in srf2fastq")
return parser
Make a stream from srf file using srf2fastq
"""
cmd = ['srf2fastq']
- if is_cnf1(filename):
+ if cnf1 or is_cnf1(filename):
cmd.append('-c')
cmd.append(filename)
import sys
import types
-from htsworkflow.frontend.samples.results import parse_flowcell_id
from htsworkflow.pipelines.sequences import scan_for_sequences
from htsworkflow.pipelines import qseq2fastq
from htsworkflow.pipelines import srf2fastq
from htsworkflow.util.api import HtswApi
+from htsworkflow.util.conversion import parse_flowcell_id
logger = logging.getLogger(__name__)
def get_qseq_condor_header(self):
return """Universe=vanilla
executable=%(exe)s
-error=%(log)s/qseq2fastq.err.$(process).log
-output=%(log)s/qseq2fastq.out.$(process).log
+error=%(log)s/qseq2fastq.$(process).out
+output=%(log)s/qseq2fastq.$(process).out
log=%(log)s/qseq2fastq.log
""" % {'exe': sys.executable,
def get_srf_condor_header(self):
return """Universe=vanilla
executable=%(exe)s
-output=%(log)s/srf_pair_fastq.out.$(process).log
-error=%(log)s/srf_pair_fastq.err.$(process).log
+output=%(log)s/srf_pair_fastq.$(process).out
+error=%(log)s/srf_pair_fastq.$(process).out
log=%(log)s/srf_pair_fastq.log
-environment="%(env)s"
+environment="PYTHONPATH=%(env)s"
""" % {'exe': sys.executable,
'log': self.log_path,
flowcell=None,
mid=None):
py = srf2fastq.__file__
- args = [ py, srf_file, ]
+ args = [ py, srf_file, '--verbose']
if paired:
args.extend(['--left', target_pathname])
# this is ugly. I did it because I was pregenerating the target
return None
else:
return unicode(value)
+
+def parse_flowcell_id(flowcell_id):
+ """
+ Return flowcell id and any status encoded in the id
+
+ We stored the status information in the flowcell id name.
+ this was dumb, but database schemas are hard to update.
+ """
+ fields = flowcell_id.split()
+ fcid = None
+ status = None
+ if len(fields) > 0:
+ fcid = fields[0]
+ if len(fields) > 1:
+ status = fields[1]
+ return fcid, status
+