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/coke6162/B2_SINE_enhancers
27 May 2023, 15:55:35 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    No releases to show
  • d0d0b9a
  • /
  • ATACseq_BMDM
  • /
  • shift_fragments.sbatch
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 ...

Permalinks

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 Iframe embedding
swh:1:cnt:952e0a8b628afed7b7fcb94a2204f3f3fe01af79
origin badgedirectory badge Iframe embedding
swh:1:dir:a0ec0a0e9e3faab9b16aa4cebf879d11564602b2
origin badgerevision badge
swh:1:rev:709eaa23c1c245c9485cdeeacaf73aa18811e9e7
origin badgesnapshot badge
swh:1:snp:c0fc443a11c562f64bc313d4db373346013605a6
Citations

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: 709eaa23c1c245c9485cdeeacaf73aa18811e9e7 authored by coke6162 on 24 February 2023, 19:54:18 UTC
updated to clarify Qiao vs McCann
Tip revision: 709eaa2
shift_fragments.sbatch
#!/bin/bash

## Script for running deeptools to shift fragments +4 and -5 for positive and negative strand, respectively

# Example usage:
# sbatch --array 0-8 shift_fragments

# General settings
#SBATCH -p short
#SBATCH -N 1
#SBATCH -c 8
#SBATCH --time=4:00:00
#SBATCH --mem=8GB

# Job name and output
#SBATCH -J shift_fragments
#SBATCH -o /Users/%u/slurmOut/slurm-%A_%a.out
#SBATCH -e /Users/%u/slurmErr/slurm-%A_%a.err

# Load modules
module load samtools/1.14

# Define query files
queries=($(ls *.sorted.dedup.bam | xargs -n 1 basename))

# Define variables
tmpDir=tmp/${SLURM_ARRAY_JOB_ID}_${SLURM_ARRAY_TASK_ID}
numCPU=8

# Make temporary directories
pwd; hostname; date

echo "Making temporary directories..."

mkdir -p ${tmpDir}/samtools
mkdir -p ${tmpDir}/deeptools

# Define temporary directory for deeptools
TMPDIR="${tmpDir}/deeptools"
export TMPDIR

# Run "alignmentSieve" to shift reads
echo $(date +"[%b %d %H:%M:%S] Starting alignmentSieve...")

echo "Processing sample: "${queries[$SLURM_ARRAY_TASK_ID]}

alignmentSieve \
--bam ${queries[$SLURM_ARRAY_TASK_ID]} \
--outFile ${queries[$SLURM_ARRAY_TASK_ID]%.sorted.dedup.bam}.sorted.dedup.shifted.bam.tmp \
--ATACshift \
--numberOfProcessors ${numCPU}

# Sort shifted bams
echo $(date +"[%b %d %H:%M:%S] Sorting shifted bams...")

samtools sort \
-@ ${numCPU} \
${queries[$SLURM_ARRAY_TASK_ID]%.sorted.dedup.bam}.sorted.dedup.shifted.bam.tmp \
> ${queries[$SLURM_ARRAY_TASK_ID]%.sorted.dedup.bam}.sorted.dedup.shifted.bam

# Index sorted bam files
echo $(date +"[%b %d %H:%M:%S] Indexing sorted shifted bams...")

samtools index \
${queries[$SLURM_ARRAY_TASK_ID]%.sorted.dedup.bam}.sorted.dedup.shifted.bam \
> ${queries[$SLURM_ARRAY_TASK_ID]%.sorted.dedup.bam}.sorted.dedup.shifted.bam.bai

# Remove intermediate bam files
echo $(date +"[%b %d %H:%M:%S] Removing intermediate files...")

rm ${queries[$SLURM_ARRAY_TASK_ID]%.sorted.dedup.bam}.sorted.dedup.shifted.bam.tmp

echo $(date +"[%b %d %H:%M:%S] Done")

Software Heritage — Copyright (C) 2015–2025, 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— Contact— JavaScript license information— Web API

back to top