Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/arjunrajlaboratory/atac-seq_pipeline_paired-end
15 July 2021, 06:34:57 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    No releases to show
  • c3be876
  • /
  • /
  • submit_batch_atac_pipelines.py
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:faf2ac9382fb9ee3807c2dfa6f2e3db77d0cb5f0
origin badgedirectory badge
swh:1:dir:c3be8763ed0c43d17cb09b29b894cfb899d1fc14
origin badgerevision badge
swh:1:rev:b165422254188ce4f89074374967f3390fd5d875
origin badgesnapshot badge
swh:1:snp:1f6cc5c29465c6dc6c689238737976557c2a04f5

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: b165422254188ce4f89074374967f3390fd5d875 authored by emsanford on 25 February 2021, 23:34:09 UTC
Update concat_zipped_fastq_files_from_illumina.py
Tip revision: b165422
submit_batch_atac_pipelines.py
import sys
import os
import glob
import re

# do not include terminal slash in directories
path_to_set_atac_pmacs_env = sys.argv[1]  # e.g., '/home/esanford/dev_atac_seq_pipeline/set_atac_pmacs_env'
path_to_atac_pipeline = sys.argv[2]       # e.g., '/home/esanford/dev_atac_seq_pipeline/atac_pipeline.py'
input_data_dir = sys.argv[3]
output_dir     = sys.argv[4]
num_bowtie2_threads = 4
memory_per_job_in_mb = 12 * 1024 #default on PMACS is 6GB. 6GB will cause most jobs to terminate if there are ~50-75M reads per sample.

sample_names = set() #start with set to disallow duplicates
for sample_filepath in glob.glob(input_data_dir + '/*'):
	try:
		sample_name_regex = '(.*/)(.*)(_R[1-2]).fastq.gz'
		re_match_obj = re.match(sample_name_regex, sample_filepath)
		sample_name = re_match_obj.group(2)
		sample_names.add(sample_name)
	except AttributeError:
		print('warning: {0} does not match expected filename for input fastq files! Expected filenames conform to this regular expression: {1}'.format(sample_filepath, sample_name_regex))

sample_name_list = list(sample_names)
print('about to submit jobs for these samples: {0}'.format(sample_name_list))
for s in sample_name_list:
	job_cmd = 'bsub -J ' + 'pipeline_' + s + ' -n ' + str(num_bowtie2_threads) + ' ' + \
				   '-M ' + str(memory_per_job_in_mb) + ' ' + \
				   '-o ' + '{0}/{1}/{1}.pipeline_stdout.txt'.format(output_dir, s) + ' ' + \
				   '-e ' + '{0}/{1}/{1}.pipeline_stderr.txt'.format(output_dir, s) + ' ' + \
				   path_to_set_atac_pmacs_env + ' ' + \
				   'python' + ' ' + \
				   path_to_atac_pipeline + ' ' + \
				   '{0} {1} {2} --num_bowtie2_threads {3}'.format(s, input_data_dir, output_dir, num_bowtie2_threads)
	print(job_cmd)
	os.system(job_cmd)

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API