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

  • cc18d27
  • /
  • TE_calling
  • /
  • get_tab_from_bed.sh
Raw File Download

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
content badge
swh:1:cnt:614a9e5cd4cd17d84510327fa19c82f4236b06d1
directory badge
swh:1:dir:0de94a0f482374ef120b247b4064585304e76e05

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
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
get_tab_from_bed.sh
#!/bin/bash
###Beatriz Navarro
###Script to convert a concatenated, sorted bed file to the table format required for TE_insertion_merger.py
###

if [ "$#" -ne 1 ]; then
    echo "$0 all_cat.bed"
else
        echo "Processing your results";

input=$1

cat $input | sed '/_non-reference_/ s/$/\tnon-reference/' | sed '/_reference_/ s/$/\treference/' > tmp.1
cat $input | awk {'print $4'} | sed 's/_non-reference/\t/' | sed 's/_reference/\t/' | awk {'print $1'} | paste tmp.1 - > tmp.2 
cat $input | awk {'print $4'} | sed 's/ngs_te_mapper/ngs-te-mapper/' | sed 's/_non-reference/\t/' | sed 's/_reference/\t/' | awk {'print $2'} |sed 's/_/\t/g' | paste tmp.2 - > tmp.3
sed -i 's/|/\t/g' tmp.3
mv tmp.3 $(basename $input .bed).tab
rm tmp.*

tab=$(basename $input .bed).tab

###Discard calls non-evidence of absence
grep -v 'nonab' $tab > $(basename $tab .tab).tab2

###Reorder the columns for TE_insertion_merger.py
cat $(basename $tab .tab).tab2 | awk {'print $1,$2,$3,$6,$9"_"$10,$11,$8,$7,$12,$13'} > $(basename $tab .tab).tab3


fi

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