This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################## | |
#set the following variables | |
############################## | |
#use the bamfile without .bam | |
myfile="alignment" | |
#the chromosome to filter for | |
mychrom="chr1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by https://www.gitignore.io/api/linux | |
### Linux ### | |
*~ | |
# KDE directory preferences | |
.directory | |
# Linux trash folder which might appear on any partition or disk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by https://www.gitignore.io/api/linux | |
### Linux ### | |
*~ | |
# KDE directory preferences | |
.directory | |
# Linux trash folder which might appear on any partition or disk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#get hash-values for all unreachable files sorted by timestamps by Mark Longair http://stackoverflow.com/questions/7374069/undo-git-reset-hard-with-uncommitted-files-in-the-staging-area | |
find .git/objects/ -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort | cut -d " " -f 3 | sed "s/\.git\/objects\/\(.*\)\/\(.*\)/\\1\\2/" > file_hashes_to_recover.txt | |
#create git restore commands | |
# awk '{FS="\t"} {print "git show "$1" > recovered"FNR".pdf"}' file_hashes_to_recover.txt > file_recovery_commands.txt | |
awk '{FS="\t"} {print "git show "$1" > recovered"FNR}' file_hashes_to_recover.txt > file_recovery_commands.txt | |
#run the restoration commands | |
bash file_recovery_commands.txt |